\input{preamble}

% OK, start here.
%
\begin{document}

\title{More on Groupoids in Spaces}


\maketitle

\phantomsection
\label{section-phantom}

\tableofcontents

\section{Introduction}
\label{section-introduction}

\noindent
This chapter is devoted to advanced topics on groupoids
in algebraic spaces.
Even though the results are stated in terms of groupoids in
algebraic spaces, the
reader should keep in mind the $2$-cartesian diagram
\begin{equation}
\label{equation-quotient-stack}
\vcenter{
\xymatrix{
R \ar[r] \ar[d] & U \ar[d] \\
U \ar[r] & [U/R]
}
}
\end{equation}
where $[U/R]$ is the quotient stack, see
Groupoids in Spaces, Remark \ref{spaces-groupoids-remark-fundamental-square}.
Many of the results are motivated by thinking about this diagram.
See for example the beautiful paper \cite{K-M} by Keel and Mori.





\section{Notation}
\label{section-notation}

\noindent
We continue to abide by the conventions and notation introduced in
Groupoids in Spaces, Section \ref{spaces-groupoids-section-notation}.





\section{Useful diagrams}
\label{section-diagrams}

\noindent
We briefly restate the results of
Groupoids in Spaces, Lemmas \ref{spaces-groupoids-lemma-diagram} and
\ref{spaces-groupoids-lemma-diagram-pull}
for easy reference in this chapter.
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces over $B$.
In the commutative diagram
\begin{equation}
\label{equation-diagram}
\vcenter{
\xymatrix{
& U & \\
R \ar[d]_s \ar[ru]^t &
R \times_{s, U, t} R
\ar[l]^-{\text{pr}_0} \ar[d]^{\text{pr}_1} \ar[r]_-c &
R \ar[d]^s \ar[lu]_t \\
U & R \ar[l]_t \ar[r]^s & U
}
}
\end{equation}
the two lower squares are fibre product squares.
Moreover, the triangle on top (which is really a square)
is also cartesian.

\medskip\noindent
The diagram
\begin{equation}
\label{equation-pull}
\vcenter{
\xymatrix{
R \times_{t, U, t} R
\ar@<1ex>[r]^-{\text{pr}_1} \ar@<-1ex>[r]_-{\text{pr}_0}
\ar[d]_{\text{pr}_0 \times c \circ (i, 1)} &
R \ar[r]^t \ar[d]^{\text{id}_R} &
U \ar[d]^{\text{id}_U} \\
R \times_{s, U, t} R
\ar@<1ex>[r]^-c \ar@<-1ex>[r]_-{\text{pr}_0} \ar[d]_{\text{pr}_1} &
R \ar[r]^t \ar[d]^s &
U \\
R \ar@<1ex>[r]^s \ar@<-1ex>[r]_t &
U
}
}
\end{equation}
is commutative. The two top rows are isomorphic via the vertical maps given.
The two lower left squares are cartesian.






\section{Local structure}
\label{section-local}

\noindent
Let $S$ be a scheme.
Let $(U, R, s, t, c, e, i)$ be a groupoid in algebraic spaces over $S$.
Let $\overline{u}$ be a geometric point of $U$. In this section we explain what
kind of structure we obtain on the local rings
(Properties of Spaces, Definition
\ref{spaces-properties-definition-etale-local-rings})
$$
A = \mathcal{O}_{U, \overline{u}}
\quad\text{and}\quad
B = \mathcal{O}_{R, e(\overline{u})}
$$
The convention we will use is to denote the local ring homomorphisms
induced by the morphisms $s, t, c, e, i$ by the corresponding letters.
In particular we have a commutative diagram
$$
\xymatrix{
A \ar[rd]_t \ar[rrd]^1 \\
& B \ar[r]^e & A \\
A \ar[ru]^s \ar[rru]_1
}
$$
of local rings. Thus if $I \subset B$ denotes the kernel of $e : B \to A$,
then $B = s(A) \oplus I = t(A) \oplus I$. Let us denote
$$
C = \mathcal{O}_{R \times_{s, U, t} R, (e, e)(\overline{u})}
$$
Then we have
$$
C =
(B \otimes_{s, A, t} B)_{\mathfrak m_B \otimes B + B \otimes \mathfrak m_B}^h
$$
because the localization
$(B \otimes_{s, A, t} B)_{\mathfrak m_B \otimes B + B \otimes \mathfrak m_B}$
has separably closed residue field.
Let $J \subset C$ be the ideal of $C$ generated by $I \otimes B + B \otimes I$.
Then $J$ is also the kernel of the local ring homomorphism
$$
(e, e) : C \longrightarrow A
$$
The composition law $c : R \times_{s, U, t} R \to R$ corresponds to a
ring map
$$
c : B \longrightarrow C
$$
sending $I$ into $J$.

\begin{lemma}
\label{lemma-first-order-structure-c}
The map $I/I^2 \to J/J^2$ induced by $c$ is the composition
$$
I/I^2 \xrightarrow{(1, 1)} I/I^2 \oplus I/I^2 \to J/J^2
$$
where the second arrow comes from the equality
$J = (I \otimes B + B \otimes I)C$.
The map $i : B \to B$ induces the map $-1 : I/I^2 \to I/I^2$.
\end{lemma}

\begin{proof}
To describe a local homomorphism from $C$ to another
henselian local ring it is enough to say what happens
to elements of the form $b_1 \otimes b_2$ by
Algebra, Lemma \ref{algebra-lemma-henselian-functorial}
for example. Keeping this in mind we have the two canonical maps
$$
e_2 : C \to B,\ b_1 \otimes b_2 \mapsto b_1s(e(b_2)),\quad
e_1 : C \to B,\ b_1 \otimes b_2 \mapsto t(e(b_1))b_2
$$
corresponding to the embeddings
$R \to R \times_{s, U, t} R$ given by
$r \mapsto (r, e(s(r)))$ and $r \mapsto (e(t(r)), r)$.
These maps define maps $J/J^2 \to I/I^2$ which jointly
give an inverse to the map $I/I^2 \oplus I/I^2 \to J/J^2$
of the lemma. Thus to prove statement we only have to show
that $e_1 \circ c : B \to B$ and $e_2 \circ c : B \to B$
are the identity maps. This follows from the fact that both
compositions $R \to R \times_{s, U, t} R \to R$ are identities.

\medskip\noindent
The statement on $i$ follows from the statement on $c$ and the
fact that $c \circ (1, i) = e \circ t$. Some details omitted.
\end{proof}








\section{Groupoid of sections}
\label{section-groupoid-sections}

\noindent
Suppose we have a groupoid $(\text{Ob}, \text{Arrows}, s, t, c, e, i)$.
Then we can construct a monoid $\Gamma$ whose elements are
maps $\delta : \text{Ob} \to \text{Arrows}$ with
$s \circ \delta = \text{id}_{\text{Ob}}$ and composition given by
$$
\delta_1 \circ \delta_2 = c(\delta_1 \circ t \circ \delta_2, \delta_2)
$$
In other words, an element of $\Gamma$ is a rule $\delta$ which
prescribes an arrow emanating from every object and composition
is the natural thing. For example
$$
\vcenter{
\xymatrix{
& \bullet \ar[dl] \\
\bullet \ar@(ul, dl)[] & \bullet \ar[d] \\
& \bullet \ar[lu]
}
}
\quad\circ\quad
\vcenter{
\xymatrix{
& \bullet \ar[d] \\
\bullet \ar[ru] & \bullet \ar[d] \\
& \bullet \ar[lu]
}
}
\quad = \quad\quad
\vcenter{
\xymatrix{
& \bullet \ar@/^/[dd] \\
\bullet \ar@(ul, dl)[] & \bullet \ar[l] \\
& \bullet \ar[lu]
}
}
$$
with obvious notation

\medskip\noindent
The same procedure can be applied to a groupoid in algebraic
spaces $(U, R, s, t, c, e, i)$ over a scheme $S$.
Namely, as elements of $\Gamma$ we take the set
$$
\Gamma = \{\delta : U \to R \mid s \circ \delta = \text{id}_U\}
$$
and composition $\circ : \Gamma \times \Gamma \to \Gamma$
is given by the rule above
\begin{equation}
\label{equation-composition}
\delta_1 \circ \delta_2 = c(\delta_1 \circ t \circ \delta_2, \delta_2)
\end{equation}
The identity is given by $e \in \Gamma$. The groupoid $\Gamma$ is not a
group in general because there may be elements $\delta \in \Gamma$
which do not have an inverse. Namely, it is clear that $\delta \in \Gamma$
will have an inverse if and only if $t \circ \delta$ is an automorphism
of $U$ and in this case
$\delta^{-1} = i \circ \delta \circ (t \circ \delta)^{-1}$.

\medskip\noindent
For later use we discuss what happens with the subgroupoid
$\Gamma_0$ of $\Gamma$ of sections which are infinitesimally
close to the identity $e$. More precisely, suppose given an
$R$-invariant closed subspace $U_0 \subset U$ such that $U$
is a first order thickening of $U_0$. Denote
$R_0 = s^{-1}(U_0) = t^{-1}(U_0)$ and let
$(U_0, R_0, s_0, t_0, c_0, e_0, i_0)$ be the corresponding
groupoid in algebraic spaces. Set
$$
\Gamma_0 = \{\delta \in \Gamma \mid \delta|_{U_0} = e_0\}
$$
If $s$ and $t$ are flat, then every element in $\Gamma_0$
is invertible. This follows because $t \circ \delta$
will be a morphism $U \to U$ inducing the identity on
$\mathcal{O}_{U_0}$ and on $\mathcal{C}_{U_0/U}$
(Lemma \ref{lemma-idenity-on-conormal})
and we conclude because we have a short exact
sequence
$0 \to \mathcal{C}_{U_0/U} \to \mathcal{O}_U \to \mathcal{O}_{U_0} \to 0$.

\begin{lemma}
\label{lemma-idenity-on-conormal}
In the situation discussed in this section, let $\delta \in \Gamma_0$
and $f = t \circ \delta : U \to U$. If $s, t$ are flat, then the
canonical map $\mathcal{C}_{U_0/U} \to \mathcal{C}_{U_0/U}$ induced by $f$
(More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-conormal-functorial})
is the identity map.
\end{lemma}

\begin{proof}
To see this we extend the bottom of the diagram (\ref{equation-pull})
as follows
$$
\xymatrix{
Y \ar[r] \ar[d] &
R \times_{s, U, t} R
\ar@<1ex>[r]^-c \ar@<-1ex>[r]_-{\text{pr}_0} \ar[d]_{\text{pr}_1} &
R \ar[r]^t \ar[d]^s &
U \\
U \ar[r]_\delta &
R \ar@<1ex>[r]^s \ar@<-1ex>[r]_t &
U
}
$$
where the left square is cartesian and this is our definition
of $Y$; we will not need to know more about $Y$.
There is a similar diagram with similar properties obtained by
base change to $U_0$ everywhere.
We are trying to show that $\text{id}_U = s \circ \delta$
and $f = t \circ \delta$ induce the same maps on conormal sheaves.
Since $s$ is flat and surjective, it suffices to prove the same
thing for the two compositions $a, b : Y \to R$ along the top row.
Observe that $a_0 = b_0$ and that one of $a$ and $b$ is an isomorphism
as we know that $s \circ \delta$ is an isomorphism. Therefore
the two morphisms $a, b : Y \to R$ are morphisms between
algebraic spaces flat over $U$ (via the morphism $t : R \to U$
and the morphism $t \circ a = t \circ b : Y \to U$).
This implies what we want. Namely, by the compatibility with compositions in
More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-conormal-functorial-more}
we conclude that both maps
$a_0^*\mathcal{C}_{R_0/R} \to \mathcal{C}_{Y_0/Y}$
fit into a commutative diagram
$$
\xymatrix{
a_0^*\mathcal{C}_{R_0/R} \ar[rr] & & \mathcal{C}_{Y_0/Y} \\
a_0^*t_0^*\mathcal{C}_{U_0/U} \ar[u] \ar@{=}[rr] & &
(t_0 \circ a_0)^*\mathcal{C}_{U_0/U} \ar[u]
}
$$
whose vertical arrows are isomorphisms by
More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-deform}.
Thus the lemma holds.
\end{proof}

\noindent
Let us identify the group $\Gamma_0$.
Applying the discussion in More on Morphisms of Spaces, Remarks
\ref{spaces-more-morphisms-remark-action-by-derivations} and
\ref{spaces-more-morphisms-remark-another-special-case}
to the diagram
$$
\xymatrix{
(U_0 \subset U) \ar@{..>}[rr]_{(e_0, \delta)}
\ar[rd]_{(\text{id}_{U_0}, \text{id}_U)} & &
(R_0 \subset R) \ar[ld]^{(s_0, s)} \\
& (U_0 \subset U)
}
$$
we see that $\delta = \theta \cdot e$ for a unique
$\mathcal{O}_{U_0}$-linear map
$\theta : e_0^*\Omega_{R_0/U_0} \to \mathcal{C}_{U_0/U}$.
Thus we get a bijection
\begin{equation}
\label{equation-isomorphism}
\Hom_{\mathcal{O}_{U_0}}(e_0^*\Omega_{R_0/U_0}, \mathcal{C}_{U_0/U})
\longrightarrow
\Gamma_0
\end{equation}
by applying More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-action-sheaf}.

\begin{lemma}
\label{lemma-composition-is-addition}
The bijection (\ref{equation-isomorphism}) is an isomorphism
of groups.
\end{lemma}

\begin{proof}
Let $\delta_1, \delta_2 \in \Gamma_0$ correspond to $\theta_1, \theta_2$
as above and the composition $\delta = \delta_1 \circ \delta_2$
in $\Gamma_0$ correspond to $\theta$. We have to show that
$\theta = \theta_1 + \theta_2$. Recall
(More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-action-by-derivations})
that $\theta_1, \theta_2, \theta$ correspond to derivations
$D_1, D_2, D : e_0^{-1}\mathcal{O}_{R_0} \to \mathcal{C}_{U_0/U}$
given by $D_1 = \theta_1 \circ \text{d}_{R_0/U_0}$ and so on.
It suffices to check that $D = D_1 + D_2$.

\medskip\noindent
We may check equality on stalks.
Let $\overline{u}$ be a geometric point of $U$ and let us use the local
rings $A, B, C$ introduced in Section \ref{section-local}.
The morphisms $\delta_i$ correspond to ring
maps $\delta_i : B \to A$. Let $K \subset A$ be the ideal of
square zero such that $A/K = \mathcal{O}_{U_0, \overline{u}}$.
In other words, $K$ is the stalk of $\mathcal{C}_{U_0/U}$ at $\overline{u}$.
The fact that $\delta_i \in \Gamma_0$
means exactly that $\delta_i(I) \subset K$.
The derivation $D_i$ is just the map $\delta_i - e : B \to A$.
Since $B = s(A) \oplus I$ we see that $D_i$ is determined by
its restriction to $I$ and that this is just given by
$\delta_i|_I$. Moreover $D_i$ and hence $\delta_i$ annihilates $I^2$
because $I = \Ker(I)$.

\medskip\noindent
To finish the proof we observe that $\delta$ corresponds to the
composition
$$
B \to C =
(B \otimes_{s, A, t} B)^h_{\mathfrak m_B \otimes B + B \otimes \mathfrak m_B}
\to A
$$
where the first arrow is $c$ and the second arrow is determined
by the rule
$b_1 \otimes b_2 \mapsto \delta_2(t(\delta_1(b_1))) \delta_2(b_2)$
as follows from (\ref{equation-composition}).
By Lemma \ref{lemma-first-order-structure-c}
we see that an element $\zeta$ of $I$ maps to
$\zeta \otimes 1 + 1 \otimes \zeta$ plus higher order terms.
Hence we conclude that
$$
D(\zeta) = (\delta_2 \circ t)\left(D_1(\zeta)\right) + D_2(\zeta)
$$
However, by Lemma \ref{lemma-idenity-on-conormal}
the action of $\delta_2 \circ t$ on
$K = \mathcal{C}_{U_0/U, \overline{u}}$ is the identity and
we win.
\end{proof}






\section{Properties of groupoids}
\label{section-technical-lemma}

\noindent
This section is the analogue of
More on Groupoids, Section \ref{more-groupoids-section-technical-lemma}.
The reader is strongly encouraged to read that section first.

\medskip\noindent
The following lemma is the analogue of
More on Groupoids, Lemma \ref{more-groupoids-lemma-property-invariant}.

\begin{lemma}
\label{lemma-property-invariant}
Let $B \to S$ be as in Section \ref{section-notation}.
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces over $B$.
Let
$\tau \in \{fppf, \linebreak[0] \etale, \linebreak[0]
smooth, \linebreak[0] syntomic\}$.
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is $\tau$-local on the target
(Descent on Spaces,
Definition \ref{spaces-descent-definition-property-morphisms-local}).
Assume $\{s : R \to U\}$ and $\{t : R \to U\}$ are coverings for the
$\tau$-topology. Let $W \subset U$ be the maximal open subspace such that
$s^{-1}(W) \to W$ has property $\mathcal{P}$.
Then $W$ is $R$-invariant
(Groupoids in Spaces,
Definition \ref{spaces-groupoids-definition-invariant-open}).
\end{lemma}

\begin{proof}
The existence and properties of the open $W \subset U$ are described in
Descent on Spaces, Lemma \ref{spaces-descent-lemma-largest-open-of-the-base}.
In
Diagram (\ref{equation-diagram})
let $W_1 \subset R$ be the maximal open subscheme over which the morphism
$\text{pr}_1 : R \times_{s, U, t} R \to R$ has property $\mathcal{P}$.
It follows from the aforementioned
Descent on Spaces, Lemma \ref{spaces-descent-lemma-largest-open-of-the-base}
and the assumption that $\{s : R \to U\}$ and $\{t : R \to U\}$ are coverings
for the $\tau$-topology that $t^{-1}(W) = W_1 = s^{-1}(W)$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-property-G-invariant}
Let $B \to S$ be as in Section \ref{section-notation}.
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces over $B$.
Let $G \to U$ be its stabilizer group algebraic space.
Let
$\tau \in \{fppf, \linebreak[0] \etale, \linebreak[0]
smooth, \linebreak[0] syntomic\}$.
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is $\tau$-local on the target.
Assume $\{s : R \to U\}$ and $\{t : R \to U\}$ are coverings for the
$\tau$-topology. Let $W \subset U$ be the maximal open subspace such that
$G_W \to W$ has property $\mathcal{P}$.
Then $W$ is $R$-invariant (see
Groupoids in Spaces,
Definition \ref{spaces-groupoids-definition-invariant-open}).
\end{lemma}

\begin{proof}
The existence and properties of the open $W \subset U$ are described in
Descent on Spaces, Lemma \ref{spaces-descent-lemma-largest-open-of-the-base}.
The morphism
$$
G \times_{U, t} R \longrightarrow R \times_{s, U} G, \quad
(g, r) \longmapsto (r, r^{-1} \circ g \circ r)
$$
is an isomorphism of algebraic spaces over $R$ (where $\circ$ denotes
composition in the groupoid). Hence $s^{-1}(W) = t^{-1}(W)$ by the
properties of $W$ proved in the aforementioned
Descent on Spaces, Lemma \ref{spaces-descent-lemma-largest-open-of-the-base}.
\end{proof}




\section{Comparing fibres}
\label{section-fibres}

\noindent
This section is the analogue of
More on Groupoids, Section \ref{more-groupoids-section-fibres}.
The reader is strongly encouraged to read that section first.

\begin{lemma}
\label{lemma-two-fibres}
Let $B \to S$ be as in Section \ref{section-notation}.
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces over $B$.
Let $K$ be a field and let $r, r' : \Spec(K) \to R$
be morphisms such that $t \circ r = t \circ r' : \Spec(K) \to U$.
Set $u = s \circ r$, $u' = s \circ r'$ and denote
$F_u = \Spec(K) \times_{u, U, s} R$ and
$F_{u'} = \Spec(K) \times_{u', U, s} R$ the fibre products.
Then $F_u \cong F_{u'}$ as algebraic spaces over $K$.
\end{lemma}

\begin{proof}
We use the properties and the existence of
Diagram (\ref{equation-diagram}).
There exists a morphism $\xi : \Spec(K) \to R \times_{s, U, t} R$
with $\text{pr}_0 \circ \xi = r$ and $c \circ \xi = r'$.
Let $\tilde r = \text{pr}_1 \circ \xi : \Spec(K) \to R$.
Then looking at the bottom two squares of
Diagram (\ref{equation-diagram})
we see that both $F_u$ and $F_{u'}$ are identified with the algebraic space
$\Spec(K) \times_{\tilde r, R, \text{pr}_1} (R \times_{s, U, t} R)$.
\end{proof}

\noindent
Actually, in the situation of the lemma the morphisms of pairs
$s : (R, r) \to (U, u)$ and $s : (R, r') \to (U, u')$ are
locally isomorphic in the $\tau$-topology, provided $\{s: R \to U\}$ is a
$\tau$-covering. We will insert a precise statement here if needed.








\section{Restricting groupoids}
\label{section-restricting-groupoids}

\noindent
In this section we collect a bunch of lemmas on
properties of groupoids which are inherited by restrictions.
Most of these lemmas can be proved by contemplating the
defining diagram
\begin{equation}
\label{equation-restriction}
\vcenter{
\xymatrix{
R' \ar[d] \ar[r] \ar@/_3pc/[dd]_{t'} \ar@/^1pc/[rr]^{s'}&
R \times_{s, U} U' \ar[r] \ar[d] &
U' \ar[d]^g \\
U' \times_{U, t} R \ar[d] \ar[r] &
R \ar[r]^s \ar[d]_t &
U \\
U' \ar[r]^g &
U
}
}
\end{equation}
of a restriction. See
Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-restrict-groupoid}.

\begin{lemma}
\label{lemma-restrict-preserves-type}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces over $B$.
Let $g : U' \to U$ be a morphism of algebraic spaces over $B$.
Let $(U', R', s', t', c')$ be the restriction of
$(U, R, s, t, c)$ via $g$.
\begin{enumerate}
\item If $s, t$ are locally of finite type and $g$ is locally of finite
type, then $s', t'$ are locally of finite type.
\item If $s, t$ are locally of finite presentation and $g$ is locally of finite
presentation, then $s', t'$ are locally of finite presentation.
\item If $s, t$ are flat and $g$ is flat, then $s', t'$ are flat.
\item Add more here.
\end{enumerate}
\end{lemma}

\begin{proof}
The property of being locally of finite type is stable under composition
and arbitrary base change, see
Morphisms of Spaces,
Lemmas \ref{spaces-morphisms-lemma-composition-finite-type} and
\ref{spaces-morphisms-lemma-base-change-finite-type}.
Hence (1) is clear from Diagram (\ref{equation-restriction}).
For the other cases, see
Morphisms of Spaces,
Lemmas \ref{spaces-morphisms-lemma-composition-finite-presentation},
\ref{spaces-morphisms-lemma-base-change-finite-presentation},
\ref{spaces-morphisms-lemma-composition-flat}, and
\ref{spaces-morphisms-lemma-base-change-flat}.
\end{proof}









\section{Properties of groups over fields and groupoids on fields}
\label{section-properties-groupoids-on-fields}

\noindent
The reader is advised to first look at the corresponding sections for
groupoid schemes, see
Groupoids, Section \ref{groupoids-section-properties-group-schemes-field}
and
More on Groupoids,
Section \ref{more-groupoids-section-properties-groupoids-on-fields}.

\begin{situation}
\label{situation-group-over-field}
Here $S$ is a scheme, $k$ is a field over $S$, and
$(G, m)$ is a group algebraic space over $\Spec(k)$.
\end{situation}

\begin{situation}
\label{situation-groupoid-on-field}
Here $S$ is a scheme, $B$ is an algebraic space, and
$(U, R, s, t, c)$ is a groupoid in algebraic spaces over $B$
with $U = \Spec(k)$ for some field $k$.
\end{situation}

\noindent
Note that in
Situation \ref{situation-group-over-field}
we obtain a groupoid in algebraic spaces
\begin{equation}
\label{equation-groupoid-from-group}
(\Spec(k), G, p, p, m)
\end{equation}
where $p : G \to \Spec(k)$ is the structure morphism of $G$, see
Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-groupoid-from-action}.
This is a situation as in
Situation \ref{situation-groupoid-on-field}.
We will use this without further mention in the rest of this section.

\begin{lemma}
\label{lemma-groupoid-on-field-open-multiplication}
In
Situation \ref{situation-groupoid-on-field}
the composition morphism $c : R \times_{s, U, t} R \to R$ is flat and
universally open.
In
Situation \ref{situation-group-over-field}
the group law $m : G \times_k G \to G$ is flat and
universally open.
\end{lemma}

\begin{proof}
The composition is isomorphic to the projection map
$\text{pr}_1 : R \times_{t, U, t} R \to R$ by
Diagram (\ref{equation-pull}).
The projection is flat as a base change of the flat morphism $t$
and open by
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-space-over-field-universally-open}.
The second assertion follows immediately from the first because
$m$ matches $c$ in (\ref{equation-groupoid-from-group}).
\end{proof}

\noindent
Note that the following lemma applies in particular when working
with either quasi-separated or locally separated algebraic spaces
(Decent Spaces, Lemma \ref{decent-spaces-lemma-locally-separated-decent}).

\begin{lemma}
\label{lemma-group-scheme-over-field-separated}
In Situation \ref{situation-groupoid-on-field}
assume $R$ is a decent space. Then $R$ is a separated algebraic space.
In Situation \ref{situation-group-over-field} assume that
$G$ is a decent algebraic space. Then $G$ is separated algebraic space.
\end{lemma}

\begin{proof}
We first prove the second assertion. By Groupoids in Spaces,
Lemma \ref{spaces-groupoids-lemma-group-scheme-separated}
we have to show that $e : S \to G$ is a closed immersion.
This follows from Decent Spaces, Lemma
\ref{decent-spaces-lemma-finite-residue-field-extension-finite}.

\medskip\noindent
Next, we prove the first assertion. To do this we may replace $B$ by $S$.
By the paragraph above the stabilizer group scheme $G \to U$ is separated. By
Groupoids in Spaces, Lemma \ref{spaces-groupoids-lemma-diagonal}
the morphism $j = (t, s) : R \to U \times_S U$ is separated.
As $U$ is the spectrum of a field the scheme
$U \times_S U$ is affine (by the construction of fibre products in
Schemes, Section \ref{schemes-section-fibre-products}).
Hence $R$ is separated, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-separated-over-separated}.
\end{proof}

\begin{lemma}
\label{lemma-restrict-groupoid-on-field}
In
Situation \ref{situation-groupoid-on-field}.
Let $k'/k$ be a field extension, $U' = \Spec(k')$
and let $(U', R', s', t', c')$ be the restriction of
$(U, R, s, t, c)$ via $U' \to U$. In the defining diagram
$$
\xymatrix{
R' \ar[d] \ar[r] \ar@/_3pc/[dd]_{t'} \ar@/^1pc/[rr]^{s'} \ar@{..>}[rd] &
R \times_{s, U} U' \ar[r] \ar[d] &
U' \ar[d] \\
U' \times_{U, t} R \ar[d] \ar[r] &
R \ar[r]^s \ar[d]_t &
U \\
U' \ar[r] &
U
}
$$
all the morphisms are surjective, flat, and universally open.
The dotted arrow $R' \to R$ is in addition affine.
\end{lemma}

\begin{proof}
The morphism $U' \to U$ equals $\Spec(k') \to \Spec(k)$,
hence is affine, surjective and flat. The morphisms $s, t : R \to U$
and the morphism $U' \to U$ are universally open by
Morphisms, Lemma \ref{morphisms-lemma-scheme-over-field-universally-open}.
Since $R$ is not empty and $U$ is the spectrum of a field the morphisms
$s, t : R \to U$ are surjective and flat. Then you conclude by using
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-base-change-surjective},
\ref{spaces-morphisms-lemma-composition-surjective},
\ref{spaces-morphisms-lemma-composition-open},
\ref{spaces-morphisms-lemma-base-change-affine},
\ref{spaces-morphisms-lemma-composition-affine},
\ref{spaces-morphisms-lemma-base-change-flat}, and
\ref{spaces-morphisms-lemma-composition-flat}.
\end{proof}

\begin{lemma}
\label{lemma-groupoid-on-field-explain-points}
In
Situation \ref{situation-groupoid-on-field}.
For any point $r \in |R|$ there exist
\begin{enumerate}
\item a field extension $k'/k$ with $k'$ algebraically closed,
\item a point $r' : \Spec(k') \to R'$ where
$(U', R', s', t', c')$ is the restriction of $(U, R, s, t, c)$
via $\Spec(k') \to \Spec(k)$
\end{enumerate}
such that
\begin{enumerate}
\item the point $r'$ maps to $r$ under the morphism $R' \to R$, and
\item the maps
$s' \circ r', t' \circ r' : \Spec(k') \to \Spec(k')$
are automorphisms.
\end{enumerate}
\end{lemma}

\begin{proof}
Let's represent $r$ by a morphism $r : \Spec(K) \to R$ for some
field $K$. To prove the lemma we have to find an algebraically closed
field $k'$ and a commutative diagram
$$
\xymatrix{
k' & k' \ar[l]^1 & \\
k' \ar[u]^\tau & K \ar[lu]^\sigma & k \ar[l]^-s \ar[lu]_i \\
& k \ar[lu]^i \ar[u]_t
}
$$
where $s, t : k \to K$ are the field maps coming from
$s \circ r$ and $t \circ r$. In the proof of
More on Groupoids,
Lemma \ref{more-groupoids-lemma-groupoid-on-field-explain-points}
it is shown how to construct such a diagram.
\end{proof}

\begin{lemma}
\label{lemma-groupoid-on-field-move-point}
In
Situation \ref{situation-groupoid-on-field}.
If $r : \Spec(k) \to R$ is a morphism such that
$s \circ r, t \circ r$ are automorphisms of $\Spec(k)$, then the map
$$
R \longrightarrow R, \quad
x \longmapsto c(r, x)
$$
is an automorphism $R \to R$ which maps $e$ to $r$.
\end{lemma}

\begin{proof}
Proof is identical to the proof of
More on Groupoids,
Lemma \ref{more-groupoids-lemma-groupoid-on-field-move-point}.
\end{proof}

\begin{lemma}
\label{lemma-groupoid-on-field-geometrically-irreducible}
In
Situation \ref{situation-groupoid-on-field}
the algebraic space $R$ is geometrically unibranch. In
Situation \ref{situation-group-over-field}
the algebraic space $G$ is geometrically unibranch.
\end{lemma}

\begin{proof}
Let $r \in |R|$. We have to show that $R$ is geometrically unibranch
at $r$. Combining
Lemma \ref{lemma-restrict-groupoid-on-field}
with
Descent on Spaces, Lemma \ref{spaces-descent-lemma-descend-unibranch}
we see that it suffices to prove this in case $k$ is algebraically closed
and $r$ comes from a morphism $r : \Spec(k) \to R$ such that
$s \circ r$ and $t \circ r$
are automorphisms of $\Spec(k)$. By
Lemma \ref{lemma-groupoid-on-field-move-point}
we reduce to the case that $r = e$ is the identity of $R$ and $k$ is
algebraically closed.

\medskip\noindent
Assume $r = e$ and $k$ is algebraically closed. Let
$A = \mathcal{O}_{R, e}$ be the \'etale local ring of
$R$ at $e$ and let
$C = \mathcal{O}_{R \times_{s, U, t} R, (e, e)}$
be the \'etale local ring of $R \times_{s, U, t} R$ at $(e, e)$.
By More on Algebra, Lemma
\ref{more-algebra-lemma-minimal-primes-tensor-strictly-henselian}
the minimal prime ideals $\mathfrak q$ of $C$ correspond $1$-to-$1$
to pairs of minimal primes $\mathfrak p, \mathfrak p' \subset A$.
On the other hand, the composition law induces a flat ring map
$$
\xymatrix{
A \ar[r]_{c^\sharp} & C & \mathfrak q \\
& A \otimes_{s^\sharp, k, t^\sharp} A \ar[u] &
\mathfrak p \otimes A + A \otimes \mathfrak p' \ar@{|}[u]
}
$$
Note that $(c^\sharp)^{-1}(\mathfrak q)$ contains both $\mathfrak p$ and
$\mathfrak p'$ as the diagrams
$$
\xymatrix{
A \ar[r]_{c^\sharp} & C \\
A \otimes_{s^\sharp, k} k \ar[u] &
A \otimes_{s^\sharp, k, t^\sharp} A \ar[l]_{1 \otimes e^\sharp} \ar[u]
}
\quad\quad
\xymatrix{
A \ar[r]_{c^\sharp} & C \\
k \otimes_{k, t^\sharp} A \ar[u] &
A \otimes_{s^\sharp, k, t^\sharp} A \ar[l]_{e^\sharp \otimes 1} \ar[u]
}
$$
commute by (\ref{equation-diagram}).
Since $c^\sharp$ is flat (as $c$ is a flat morphism by
Lemma \ref{lemma-groupoid-on-field-open-multiplication}),
we see that $(c^\sharp)^{-1}(\mathfrak q)$ is a minimal prime
of $A$. Hence $\mathfrak p = (c^\sharp)^{-1}(\mathfrak q) = \mathfrak p'$.
\end{proof}

\noindent
In the following lemma we use dimension of algebraic spaces (at a point)
as defined in
Properties of Spaces, Section \ref{spaces-properties-section-dimension}.
We also use the dimension of the local ring defined in
Properties of Spaces, Section
\ref{spaces-properties-section-dimension-local-ring}
and transcendence degree of points, see
Morphisms of Spaces, Section \ref{spaces-morphisms-section-relative-dimension}.

\begin{lemma}
\label{lemma-groupoid-on-field-locally-finite-type-dimension}
In
Situation \ref{situation-groupoid-on-field}
assume $s, t$ are locally of finite type.
For all $r \in |R|$
\begin{enumerate}
\item $\dim(R) = \dim_r(R)$,
\item the transcendence degree of $r$ over $\Spec(k)$
via $s$ equals the transcendence degree of $r$ over $\Spec(k)$
via $t$, and
\item if the transcendence degree mentioned in (2) is $0$, then
$\dim(R) = \dim(\mathcal{O}_{R, \overline{r}})$.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $r \in |R|$. Denote $\text{trdeg}(r/_{\!\! s}k)$ the transcendence
degree of $r$ over $\Spec(k)$ via $s$. Choose an \'etale morphism
$\varphi : V \to R$ where $V$ is a scheme and $v \in V$ mapping to $r$.
Using the definitions mentioned above the lemma we see that
$$
\dim_r(R) = \dim_v(V) =
\dim(\mathcal{O}_{V, v}) + \text{trdeg}_{s(k)}(\kappa(v)) =
\dim(\mathcal{O}_{R, \overline{r}}) + \text{trdeg}(r/_{\!\! s}k)
$$
and similarly for $t$ (the second equality by
Morphisms, Lemma \ref{morphisms-lemma-dimension-fibre-at-a-point}).
Hence we see that $\text{trdeg}(r/_{\!\! s}k) = \text{trdeg}(r/_{\!\! t}k)$,
i.e., (2) holds.

\medskip\noindent
Let $k'/k$ be a field extension. Note that the restriction $R'$
of $R$ to $\Spec(k')$ (see
Lemma \ref{lemma-restrict-groupoid-on-field})
is obtained from $R$ by two base changes by morphisms of fields. Thus
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-dimension-fibre-after-base-change}
shows the dimension of $R$ at a point is unchanged by this operation.
Hence in order to prove (1) we may assume, by
Lemma \ref{lemma-groupoid-on-field-explain-points},
that $r$ is represented by a morphism $r : \Spec(k) \to R$ such
that both $s \circ r$ and $t \circ r$ are automorphisms of $\Spec(k)$.
In this case there exists an automorphism $R \to R$ which maps $r$ to $e$
(Lemma \ref{lemma-groupoid-on-field-move-point}).
Hence we see that $\dim_r(R) = \dim_e(R)$ for any $r$. By definition this
means that $\dim_r(R) = \dim(R)$.

\medskip\noindent
Part (3) is a formal consequence of the results obtained in the discussion
above.
\end{proof}

\begin{lemma}
\label{lemma-group-over-field-locally-finite-type-dimension}
In
Situation \ref{situation-group-over-field}
assume $G$ locally of finite type.
For all $g \in |G|$
\begin{enumerate}
\item $\dim(G) = \dim_g(G)$,
\item if the transcendence degree of $g$ over $k$ is $0$, then
$\dim(G) = \dim(\mathcal{O}_{G, \overline{g}})$.
\end{enumerate}
\end{lemma}

\begin{proof}
Immediate from
Lemma \ref{lemma-groupoid-on-field-locally-finite-type-dimension}
via (\ref{equation-groupoid-from-group}).
\end{proof}

\begin{lemma}
\label{lemma-groupoid-on-field-dimension-equal-stabilizer}
In
Situation \ref{situation-groupoid-on-field}
assume $s, t$ are locally of finite type.
Let
$G = \Spec(k)
\times_{\Delta, \Spec(k) \times_B \Spec(k), t \times s} R$
be the stabilizer group algebraic space.
Then we have $\dim(R) = \dim(G)$.
\end{lemma}

\begin{proof}
Since $G$ and $R$ are equidimensional (see
Lemmas \ref{lemma-groupoid-on-field-locally-finite-type-dimension} and
\ref{lemma-group-over-field-locally-finite-type-dimension})
it suffices to prove that $\dim_e(R) = \dim_e(G)$. Let $V$ be an affine scheme,
$v \in V$, and let $\varphi : V \to R$ be an \'etale morphism of schemes
such that $\varphi(v) = e$. Note that $V$ is a Noetherian scheme as
$s \circ \varphi$ is locally of finite type as a composition of morphisms
locally of finite type and as $V$ is quasi-compact (use
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-composition-finite-type},
\ref{spaces-morphisms-lemma-etale-locally-finite-presentation}, and
\ref{spaces-morphisms-lemma-finite-presentation-finite-type}
and
Morphisms, Lemma \ref{morphisms-lemma-finite-type-noetherian}).
Hence $V$ is locally connected (see
Properties, Lemma \ref{properties-lemma-Noetherian-topology}
and
Topology, Lemma \ref{topology-lemma-locally-Noetherian-locally-connected}).
Thus we may replace $V$ by the connected component containing $v$ (it
is still affine as it is an open and closed subscheme of $V$).
Set $T = V_{red}$ equal to the reduction of $V$. Consider the two
morphisms $a, b : T \to \Spec(k)$ given by
$a = s \circ \varphi|_T$ and $b = t \circ \varphi|_T$. Note that
$a, b$ induce the same field map $k \to \kappa(v)$ because $\varphi(v) = e$!
Let $k_a \subset \Gamma(T, \mathcal{O}_T)$ be the integral closure of
$a^\sharp(k) \subset \Gamma(T, \mathcal{O}_T)$. Similarly, let
$k_b \subset \Gamma(T, \mathcal{O}_T)$ be the integral closure of
$b^\sharp(k) \subset \Gamma(T, \mathcal{O}_T)$. By
Varieties, Proposition \ref{varieties-proposition-unique-base-field}
we see that $k_a = k_b$. Thus we obtain the following commutative diagram
$$
\xymatrix{
k \ar[rd]^a \ar[rrrd] \\
& k_a = k_b \ar[r] & \Gamma(T, \mathcal{O}_T) \ar[r] & \kappa(v) \\
k \ar[ru]_b \ar[rrru]
}
$$
As discussed above the long arrows are equal.
Since $k_a = k_b \to \kappa(v)$ is injective we conclude that
the two morphisms $a$ and $b$ agree. Hence $T \to R$ factors through $G$.
It follows that $R_{red} = G_{red}$ in an open neighbourhood of $e$
which certainly implies that $\dim_e(R) = \dim_e(G)$.
\end{proof}






\section{Group algebraic spaces over fields}
\label{section-group-algebraic-spaces-over-fields}

\noindent
There exists a nonseparated group algebraic space over a field,
namely $\mathbf{G}_a/\mathbf{Z}$ over a field of characteristic zero, see
Examples, Section \ref{examples-section-non-separated-group-space}.
In fact any group scheme over a field is separated
(Lemma \ref{lemma-group-scheme-over-field-separated})
hence every nonseparated group algebraic space over a field
is nonrepresentable. On the other hand, a group algebraic
space over a field is separated as soon as it is decent, see
Lemma \ref{lemma-group-scheme-over-field-separated}.
In this section we will show that
a separated group algebraic space over a field
is representable, i.e., a scheme.

\begin{lemma}
\label{lemma-group-space-scheme-over-kbar}
Let $k$ be a field with algebraic closure $\overline{k}$.
Let $G$ be a group algebraic space over $k$
which is separated\footnote{It is enough to assume $G$ is decent,
e.g., locally separated or quasi-separated by
Lemma \ref{lemma-group-scheme-over-field-separated}.}.
Then $G_{\overline{k}}$ is a scheme.
\end{lemma}

\begin{proof}
By Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-when-scheme-after-base-change}
it suffices to show that $G_K$ is a scheme for some field
extension $K/k$. Denote $G_K' \subset G_K$ the schematic
locus of $G_K$ as in Properties of Spaces, Lemma
\ref{spaces-properties-lemma-subscheme}.
By Properties of Spaces, Proposition
\ref{spaces-properties-proposition-locally-quasi-separated-open-dense-scheme}
we see that $G_K' \subset G_K$ is dense open, in particular not empty.
Choose a scheme $U$ and a surjective \'etale morphism $U \to G$. By
Varieties, Lemma \ref{varieties-lemma-make-Jacobson}
if $K$ is an algebraically closed field of large enough
transcendence degree, then $U_K$ is a Jacobson scheme and
every closed point of $U_K$ is $K$-rational.
Hence $G_K'$ has a $K$-rational point and it suffices
to show that every $K$-rational point of $G_K$ is in $G_K'$.
If $g \in G_K(K)$ is a $K$-rational point and $g' \in G_K'(K)$
a $K$-rational point in the schematic locus, then we see that
$g$ is in the image of $G_K'$ under the automorphism
$$
G_K \longrightarrow G_K,\quad
h \longmapsto g(g')^{-1}h
$$
of $G_K$. Since automorphisms of $G_K$ as an algebraic space preserve
$G_K'$, we conclude that $g \in G_K'$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-group-space-scheme-locally-finite-type-over-k}
Let $k$ be a field. Let $G$ be a group algebraic space over $k$.
If $G$ is separated and locally of finite type over $k$,
then $G$ is a scheme.
\end{lemma}

\begin{proof}
This follows from
Lemma \ref{lemma-group-space-scheme-over-kbar},
Groupoids, Lemma \ref{groupoids-lemma-points-in-affine}, and
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-scheme-over-algebraic-closure-enough-affines}.
\end{proof}

\begin{proposition}
\label{proposition-group-space-scheme-over-field}
Let $k$ be a field. Let $G$ be a group algebraic space over $k$.
If $G$ is separated, then $G$ is a scheme.
\end{proposition}

\begin{proof}
This lemma generalizes
Lemma \ref{lemma-group-space-scheme-locally-finite-type-over-k}
(which covers all cases one cares about in practice).
The proof is very similar to the proof of
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-scheme-over-algebraic-closure-enough-affines}
used in the proof of
Lemma \ref{lemma-group-space-scheme-locally-finite-type-over-k}
and we encourage the reader to read that proof first.

\medskip\noindent
By Lemma \ref{lemma-group-space-scheme-over-kbar} the base
change $G_{\overline{k}}$ is a scheme.
Let $K/k$ be a purely transcendental extension of very large
transcendence degree. By Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-scheme-after-purely-transcendental-base-change}
it suffices to show that $G_K$ is a scheme.
Let $K^{perf}$ be the perfect closure of $K$. By
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-scheme-after-purely-inseparable-base-change}
it suffices to show that $G_{K^{perf}}$ is a scheme.
Let $K \subset K^{perf} \subset \overline{K}$ be the algebraic closure
of $K$. We may choose an embedding $\overline{k} \to \overline{K}$ over
$k$, so that $G_{\overline{K}}$ is the base change of the scheme
$G_{\overline{k}}$ by $\overline{k} \to \overline{K}$. By
Varieties, Lemma \ref{varieties-lemma-make-Jacobson}
we see that $G_{\overline{K}}$ is a Jacobson scheme all of whose
closed points have residue field $\overline{K}$.

\medskip\noindent
Since $G_{\overline{K}} \to G_{K^{perf}}$ is surjective, it suffices to
show that the image $g \in |G_{K^{perf}}|$ of an arbitrary closed point of
$G_{\overline{K}}$ is in the schematic locus of $G_K$.
In particular, we may represent $g$ by a morphism
$g : \Spec(L) \to G_{K^{perf}}$ where $L/K^{perf}$ is separable algebraic
(for example we can take $L = \overline{K}$). Thus the scheme
\begin{align*}
T & = \Spec(L) \times_{G_{K^{perf}}} G_{\overline{K}} \\
& =
\Spec(L) \times_{\Spec(K^{perf})} \Spec(\overline{K}) \\
& =
\Spec(L \otimes_{K^{perf}} \overline{K})
\end{align*}
is the spectrum of a $\overline{K}$-algebra which is a filtered colimit
of algebras which are finite products of copies of $\overline{K}$.
Thus by Groupoids, Lemma \ref{groupoids-lemma-compact-set-in-affine}
we can find an affine open $W \subset G_{\overline{K}}$ containing
the image of $g_{\overline{K}} : T \to G_{\overline{K}}$.

\medskip\noindent
Choose a quasi-compact open $V \subset G_{K^{perf}}$ containing the
image of $W$. By Spaces over Fields,
Lemma \ref{spaces-over-fields-lemma-when-scheme-after-base-change}
we see that $V_{K'}$ is a scheme for some finite extension $K'/K^{perf}$.
After enlarging $K'$ we may assume that there exists an affine open
$U' \subset V_{K'} \subset G_{K'}$ whose base change to $\overline{K}$
recovers $W$ (use that $V_{\overline{K}}$ is the limit of the schemes
$V_{K''}$ for $K' \subset K'' \subset \overline{K}$ finite and use
Limits, Lemmas \ref{limits-lemma-descend-opens} and
\ref{limits-lemma-limit-affine}). We may assume
that $K'/K^{perf}$ is a Galois extension (take the normal closure
Fields, Lemma \ref{fields-lemma-normal-closure} and use
that $K^{perf}$ is perfect). Set $H = \text{Gal}(K'/K^{perf})$.
By construction the $H$-invariant closed subscheme
$\Spec(L) \times_{G_{K^{perf}}} G_{K'}$ is contained in $U'$.
By
Spaces over Fields, Lemmas
\ref{spaces-over-fields-lemma-base-change-by-Galois} and
\ref{spaces-over-fields-lemma-when-quotient-scheme-at-point} we conclude.
\end{proof}





\section{No rational curves on groups}
\label{section-no-rational-curves}

\noindent
In this section we prove that there are no nonconstant morphisms
from $\mathbf{P}^1$ to a group algebraic space locally of finite
type over a field.

\begin{lemma}
\label{lemma-factor-through-over-open}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $f : X \to Y$ and $g : X \to Z$ be morphisms of algebraic
spaces over $B$. Assume
\begin{enumerate}
\item $Y \to B$ is separated,
\item $g$ is surjective, flat, and locally of finite presentation,
\item there is a scheme theoretically dense open $V \subset Z$
such that $f|_{g^{-1}(V)} : g^{-1}(V) \to Y$ factors through $V$.
\end{enumerate}
Then $f$ factors through $g$.
\end{lemma}

\begin{proof}
Set $R = X \times_Z X$. By (2) we see that $Z = X/R$ as sheaves.
Also (2) implies that the inverse image of $V$ in $R$ is scheme
theoretically dense in $R$ (Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-flat-morphism-scheme-theoretically-dense-open}).
The we see that the two compositions
$R \to X \to Y$ are equal by Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-equality-of-morphisms}.
The lemma follows.
\end{proof}

\begin{lemma}
\label{lemma-quotient-power-P1}
\begin{slogan}
A morphism from a nonempty product of projective lines over a field to
a separated finite type algebraic space over a field factors as a
finite morphism after a projection to a product of projective lines.
\end{slogan}
Let $k$ be a field. Let $n \geq 1$ and let $(\mathbf{P}^1_k)^n$
be the $n$-fold self product over $\Spec(k)$. Let
$f : (\mathbf{P}^1_k)^n \to Z$ be a morphism of algebraic spaces over $k$.
If $Z$ is separated of finite type over $k$, then $f$ factors as
$$
(\mathbf{P}^1_k)^n \xrightarrow{projection}
(\mathbf{P}^1_k)^m \xrightarrow{finite} Z.
$$
\end{lemma}

\begin{proof}
We may assume $k$ is algebraically closed (details omitted); we only
do this so we may argue using rational points, but the reader can work
around this if she/he so desires. In the proof products are over $k$.
The automorphism group algebraic space of $(\mathbf{P}^1_k)^n$ contains
$G = (\text{GL}_{2, k})^n$. If $C \subset (\mathbf{P}^1_k)^n$ is a
closed subvariety (in particular irreducible over $k$) which is mapped
to a point, then we can apply
More on Morphisms of Spaces,
Lemma \ref{spaces-more-morphisms-lemma-flat-proper-family-cannot-collapse-fibre}
to the morphism
$$
G \times C \to G \times Z,\quad (g, c) \mapsto (g, f(g \cdot c))
$$
over $G$. Hence $g(C)$ is mapped to a point for $g \in G(k)$
lying in a Zariski open $U \subset G$. Suppose
$x = (x_1, \ldots, x_n)$, $y = (y_1, \ldots, y_n)$
are $k$-valued points of $(\mathbf{P}^1_k)^n$. Let
$I \subset \{1, \ldots, n\}$ be the set of indices $i$
such that $x_i = y_i$. Then
$$
\{g(x) \mid g(y) = y,\ g \in U(k)\}
$$
is Zariski dense in the fibre of the projection
$\pi_I : (\mathbf{P}^1_k)^n \to \prod_{i \in I} \mathbf{P}^1_k$
(exercise). Hence if $x, y \in C(k)$ are distinct, we conclude
that $f$ maps the whole fibre of $\pi_I$ containing $x, y$ to a
single point. Moreover, the $U(k)$-orbit of $C$ meets a Zariski
open set of fibres of $\pi_I$. By Lemma \ref{lemma-factor-through-over-open}
the morphism $f$ factors through $\pi_I$.
After repeating this process finitely many times we reach
the stage where all fibres of $f$ over $k$ points are finite.
In this case $f$ is finite by
More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-proper-finite-fibre-finite-in-neighbourhood}
and the fact that $k$ points are dense in $Z$
(Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-smooth-separable-closed-points-dense}).
\end{proof}

\begin{lemma}
\label{lemma-no-nonconstant-morphism-from-P1-to-group}
\begin{slogan}
No complete rational curves on groups.
\end{slogan}
Let $k$ be a field. Let $G$ be a separated group algebraic space locally
of finite type over $k$. There does not exist a nonconstant
morphism $f : \mathbf{P}^1_k \to G$ over $\Spec(k)$.
\end{lemma}

\begin{proof}
Assume $f$ is nonconstant. Consider the morphisms
$$
\mathbf{P}^1_k \times_{\Spec(k)} \ldots \times_{\Spec(k)} \mathbf{P}^1_k
\longrightarrow G,
\quad (t_1, \ldots, t_n) \longmapsto f(g_1) \ldots f(g_n)
$$
where on the right hand side we use multiplication in the group.
By Lemma \ref{lemma-quotient-power-P1} and the assumption that $f$
is nonconstant this morphism is finite onto its image.
Hence $\dim(G) \geq n$ for all $n$, which is impossible by
Lemma \ref{lemma-group-over-field-locally-finite-type-dimension}
and the fact that $G$ is locally of finite type over $k$.
\end{proof}




\section{The finite part of a morphism}
\label{section-finite}

\noindent
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
For an algebraic space or a scheme $T$ over $S$ consider pairs
$(a, Z)$ where
\begin{equation}
\label{equation-finite-conditions}
\begin{matrix}
a : T \to Y\text{ is a morphism over }S, \\
Z \subset T \times_Y X\text{ is an open subspace} \\
\text{such that }\text{pr}_0|_Z : Z \to T\text{ is finite.}
\end{matrix}
\end{equation}
Suppose $h : T' \to T$ is a morphism of algebraic spaces over $S$
and $(a, Z)$ is a pair as in (\ref{equation-finite-conditions}) over $T$. Set
$a' = a \circ h$ and $Z' = (h \times \text{id}_X)^{-1}(Z) = T' \times_T Z$.
Then $(a', Z')$ is a pair as in (\ref{equation-finite-conditions}) over $T'$.
This follows as finite morphisms are preserved under base change, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-integral}.
Thus we obtain a functor
\begin{equation}
\label{equation-finite}
\begin{matrix}
(X/Y)_{fin} : &
(\Sch/S)^{opp} &
\longrightarrow &
\textit{Sets} \\
& T & \longmapsto &
\{(a, Z)\text{ as above}\}
\end{matrix}
\end{equation}
For applications we are mainly interested in this functor $(X/Y)_{fin}$
when $f$ is separated and locally of finite type. To get an idea
of what this is all about, take a look at
Remark \ref{remark-finite-quasi-finite-separated-morphism-schemes}.

\begin{lemma}
\label{lemma-finite-sheaf}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Then we have
\begin{enumerate}
\item The presheaf $(X/Y)_{fin}$ satisfies the sheaf condition for
the fppf topology.
\item If $T$ is an algebraic space over $S$, then there is a
canonical bijection
$$
\Mor_{\Sh((\Sch/S)_{fppf})}(T, (X/Y)_{fin})
=
\{(a, Z)\text{ satisfying \ref{equation-finite-conditions}}\}
$$
\end{enumerate}
\end{lemma}

\begin{proof}
Let $T$ be an algebraic space over $S$.
Let $\{T_i \to T\}$ be an fppf covering (by algebraic spaces).
Let $s_i = (a_i, Z_i)$ be pairs over $T_i$
satisfying \ref{equation-finite-conditions}
such that we have $s_i|_{T_i \times_T T_j} = s_j|_{T_i \times_T T_j}$.
First, this implies in particular that $a_i$ and $a_j$ define the same
morphism $T_i \times_T T_j \to Y$. By
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-fpqc-universal-effective-epimorphisms}
we deduce that there exists a unique morphism $a : T \to Y$
such that $a_i$ equals the composition $T_i \to T \to Y$.
Second, this implies that $Z_i \subset T_i \times_Y X$ are open subspaces
whose inverse images in $(T_i \times_T T_j) \times_Y X$ are equal.
Since $\{T_i \times_Y X \to T \times_Y X\}$ is an fppf covering
we deduce that there exists a unique open subspace $Z \subset T \times_Y X$
which restricts back to $Z_i$ over $T_i$, see
Descent on Spaces, Lemma \ref{spaces-descent-lemma-open-fpqc-covering}.
We claim that the projection $Z \to T$ is finite.
This follows as being finite is local for the fpqc topology, see
Descent on Spaces, Lemma \ref{spaces-descent-lemma-descending-property-finite}.

\medskip\noindent
Note that the result of the preceding paragraph in particular implies (1).

\medskip\noindent
Let $T$ be an algebraic space over $S$. In order to prove (2) we will
construct mutually inverse maps between the displayed sets. In the
following when we say ``pair'' we mean a pair satisfying
conditions \ref{equation-finite-conditions}.

\medskip\noindent
Let $v : T \to (X/Y)_{fin}$ be a natural transformation.
Choose a scheme $U$ and a surjective \'etale morphism $p : U \to T$.
Then $v(p) \in (X/Y)_{fin}(U)$ corresponds to a pair $(a_U, Z_U)$
over $U$. Let $R = U \times_T U$ with projections $t, s : R \to U$.
As $v$ is a transformation of functors we see that the pullbacks of
$(a_U, Z_U)$ by $s$ and $t$ agree. Hence, since $\{U \to T\}$ is an
fppf covering, we may apply the result of the first paragraph that
deduce that there exists a unique pair $(a, Z)$ over $T$.

\medskip\noindent
Conversely, let $(a, Z)$ be a pair over $T$.
Let $U \to T$, $R = U \times_T U$, and $t, s : R \to U$ be as
above. Then the restriction $(a, Z)|_U$ gives rise to a
transformation of functors $v : h_U \to (X/Y)_{fin}$ by the
Yoneda lemma
(Categories, Lemma \ref{categories-lemma-yoneda}).
As the two pullbacks $s^*(a, Z)|_U$ and $t^*(a, Z)|_U$
are equal, we see that $v$ coequalizes the two maps
$h_t, h_s : h_R \to h_U$. Since $T = U/R$ is the fppf quotient sheaf by
Spaces, Lemma \ref{spaces-lemma-space-presentation}
and since $(X/Y)_{fin}$ is an fppf sheaf by (1) we conclude
that $v$ factors through a map $T \to (X/Y)_{fin}$.

\medskip\noindent
We omit the verification that the two constructions above are mutually
inverse.
\end{proof}

\begin{lemma}
\label{lemma-finite-open}
Let $S$ be a scheme. Consider a commutative diagram
$$
\xymatrix{
X' \ar[rr]_j \ar[rd] & & X \ar[ld] \\
& Y
}
$$
of algebraic spaces over $S$. If $j$ is an open immersion, then
there is a canonical injective map of sheaves
$j : (X'/Y)_{fin} \to (X/Y)_{fin}$.
\end{lemma}

\begin{proof}
If $(a, Z)$ is a pair over $T$ for $X'/Y$, then
$(a, j(Z))$ is a pair over $T$ for $X/Y$.
\end{proof}

\begin{lemma}
\label{lemma-finite-lives-on-locally-quasi-finite-part}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$ which is
locally of finite type.
Let $X' \subset X$ be the maximal open subspace over which $f$ is
locally quasi-finite, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-locally-finite-type-quasi-finite-part}.
Then $(X/Y)_{fin} = (X'/Y)_{fin}$.
\end{lemma}

\begin{proof}
Lemma \ref{lemma-finite-open}
gives us an injective map $(X'/Y)_{fin} \to (X/Y)_{fin}$.
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-locally-finite-type-quasi-finite-part}
assures us that formation of $X'$ commutes with base change.
Hence everything comes down to proving that if
$Z \subset X$ is an open subspace such that $f|_Z : Z \to Y$ is finite,
then $Z \subset X'$. This is true because a finite morphism
is locally quasi-finite, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-quasi-finite}.
\end{proof}

\begin{lemma}
\label{lemma-finite-separated}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Let $T$ be an algebraic space over $S$, and let $(a, Z)$ be
a pair as in \ref{equation-finite-conditions}.
If $f$ is separated, then $Z$ is closed in $T \times_Y X$.
\end{lemma}

\begin{proof}
A finite morphism of algebraic spaces is universally closed by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-proper}.
Since $f$ is separated so is the morphism $T \times_Y X \to T$, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-separated}.
Thus the closedness of $Z$ follows from
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-universally-closed-permanence}.
\end{proof}

\begin{remark}
\label{remark-finite-monoid}
Let $f : X \to Y$ be a separated morphism of algebraic spaces.
The sheaf $(X/Y)_{fin}$ comes with a natural map
$(X/Y)_{fin} \to Y$ by mapping the pair $(a, Z) \in (X/Y)_{fin}(T)$
to the element $a \in Y(T)$. We can use
Lemma \ref{lemma-finite-separated}
to define operations
$$
\star_i : (X/Y)_{fin} \times_Y (X/Y)_{fin} \longrightarrow (X/Y)_{fin}
$$
by the rules
\begin{align*}
\star_1 : ((a, Z_1), (a, Z_2)) & \longmapsto (a, Z_1 \cup Z_2) \\
\star_2 : ((a, Z_1), (a, Z_2)) & \longmapsto (a, Z_1 \cap Z_2) \\
\star_3 : ((a, Z_1), (a, Z_2)) & \longmapsto (a, Z_1 \setminus Z_2) \\
\star_4 : ((a, Z_1), (a, Z_2)) & \longmapsto (a, Z_2 \setminus Z_1).
\end{align*}
The reason this works is that $Z_1 \cap Z_2$ is both open and closed
inside $Z_1$ and $Z_2$ (which also implies that $Z_1 \cup Z_2$ is
the disjoint union of the other three pieces).
Thus we can think of $(X/Y)_{fin}$ as an $\mathbf{F}_2$-algebra
(without unit) over $Y$ with multiplication given by
$ss' = \star_2(s, s')$, and addition given by
$$
s + s' = \star_1(\star_3(s, s'), \star_4(s, s'))
$$
which boils down to taking the symmetric difference.
Note that in this sheaf of algebras $0 = (1_Y, \emptyset)$
and that indeed $s + s = 0$ for any local section $s$.
If $f : X \to Y$ is finite, then this algebra has a unit namely
$1 = (1_Y, X)$ and $\star_3(s, s') = s(1 + s')$, and
$\star_4(s, s') = (1 + s)s'$.
\end{remark}

\begin{remark}
\label{remark-finite-quasi-finite-separated-morphism-schemes}
Let $f : X \to Y$ be a separated, locally quasi-finite
morphism of schemes. In this case the sheaf $(X/Y)_{fin}$
is closely related to the sheaf $f_!\mathbf{F}_2$
(insert future reference here) on $Y_\etale$.
Namely, if $V \to Y$ is \'etale, and $s \in \Gamma(V, f_!\mathbf{F}_2)$,
then $s \in \Gamma(V \times_Y X, \mathbf{F}_2)$ is a section
with proper support $Z = \text{Supp}(s)$ over $V$. Since $f$ is
also locally quasi-finite we see that the projection $Z \to V$ is actually
finite. Since the support of a section of a constant abelian sheaf is open
we see that the pair $(V \to Y, \text{Supp}(s))$ satisfies
\ref{equation-finite-conditions}.
In fact, $f_!\mathbf{F}_2 \cong (X/Y)_{fin}|_{Y_\etale}$
in this case which also explains the $\mathbf{F}_2$-algebra structure
introduced in Remark \ref{remark-finite-monoid}.
\end{remark}

\begin{lemma}
\label{lemma-finite-diagonal}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
The diagonal of $(X/Y)_{fin} \to Y$
$$
(X/Y)_{fin} \longrightarrow (X/Y)_{fin} \times_Y (X/Y)_{fin}
$$
is representable (by schemes) and an open immersion and the ``absolute''
diagonal
$$
(X/Y)_{fin} \longrightarrow (X/Y)_{fin} \times (X/Y)_{fin}
$$
is representable (by schemes).
\end{lemma}

\begin{proof}
The second statement follows from the first as the absolute diagonal
is the composition of the relative diagonal and a base change
of the diagonal of $Y$ (which is representable by schemes), see
Spaces, Section \ref{spaces-section-representable}.
To prove the first assertion we have to show the following:
Given a scheme $T$ and two pairs $(a, Z_1)$ and $(a, Z_2)$ over $T$
with identical first component
satisfying \ref{equation-finite-conditions}
there is an open subscheme $V \subset T$ with the following
property: For any morphism of schemes $h : T' \to T$ we have
$$
h(T') \subset V \Leftrightarrow
\Big(T' \times_T Z_1 = T' \times_T Z_2
\text{ as subspaces of }T' \times_Y X\Big)
$$
Let us construct $V$. Note that $Z_1 \cap Z_2$ is open in $Z_1$
and in $Z_2$. Since $\text{pr}_0|_{Z_i} : Z_i \to T$ is finite,
hence proper (see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-proper})
we see that
$$
E =
\text{pr}_0|_{Z_1}\left(Z_1 \setminus Z_1 \cap Z_2)\right)
\cup
\text{pr}_0|_{Z_2}\left(Z_2 \setminus Z_1 \cap Z_2)\right)
$$
is closed in $T$. Now it is clear that $V = T \setminus E$ works.
\end{proof}

\begin{lemma}
\label{lemma-finite-criterion-etale}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Suppose that $U$ is a scheme, $U \to Y$ is an \'etale morphism and
$Z \subset U \times_Y X$ is an open subspace finite over $U$.
Then the induced morphism $U \to (X/Y)_{fin}$ is \'etale.
\end{lemma}

\begin{proof}
This is formal from the description of the diagonal in
Lemma \ref{lemma-finite-diagonal}
but we write it out since it is an important step in the development
of the theory. We have to check that for any scheme $T$ over $S$ and a morphism
$T \to (X/Y)_{fin}$ the projection map
$$
T \times_{(X/Y)_{fin}} U \longrightarrow T
$$
is \'etale. Note that
$$
T \times_{(X/Y)_{fin}} U
=
(X/Y)_{fin} \times_{((X/Y)_{fin} \times_Y (X/Y)_{fin})} (T \times_Y U)
$$
Applying the result of
Lemma \ref{lemma-finite-diagonal}
we see that $T \times_{(X/Y)_{fin}} U$ is represented by an open subscheme of
$T \times_Y U$. As the projection $T \times_Y U \to T$ is \'etale by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-etale}
we conclude.
\end{proof}

\begin{lemma}
\label{lemma-finite-pullback}
Let $S$ be a scheme.
Let
$$
\xymatrix{
X' \ar[d] \ar[r] & X \ar[d] \\
Y' \ar[r] & Y
}
$$
be a fibre product square of algebraic spaces over $S$. Then
$$
\xymatrix{
(X'/Y')_{fin} \ar[d] \ar[r] & (X/Y)_{fin} \ar[d] \\
Y' \ar[r] & Y
}
$$
is a fibre product square of sheaves on $(\Sch/S)_{fppf}$.
\end{lemma}

\begin{proof}
It follows immediately from the definitions that
the sheaf $(X'/Y')_{fin}$ is equal to the sheaf
$Y' \times_Y (X/Y)_{fin}$.
\end{proof}

\begin{lemma}
\label{lemma-finite-surjective-etale-cover}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
If $f$ is separated and locally quasi-finite, then there exists a
scheme $U$ \'etale over $Y$ and a surjective \'etale morphism
$U \to (X/Y)_{fin}$ over $Y$.
\end{lemma}

\begin{proof}
Note that the assertion makes sense by the result of
Lemma \ref{lemma-finite-diagonal}
on the diagonal of $(X/Y)_{fin}$, see
Spaces, Lemma \ref{spaces-lemma-representable-diagonal}.
Let $V$ be a scheme and let $V \to Y$ be a surjective \'etale morphism. By
Lemma \ref{lemma-finite-pullback}
the morphism $(V \times_Y X/V)_{fin} \to (X/Y)_{fin}$ is
a base change of the map $V \to Y$ and hence is surjective and \'etale, see
Spaces,
Lemma \ref{spaces-lemma-base-change-representable-transformations-property}.
Hence it suffices to prove the lemma for $(V \times_Y X/V)_{fin}$.
(Here we implicitly use that the composition of representable, surjective, and
\'etale transformations of functors is again representable, surjective, and
\'etale, see
Spaces, Lemmas \ref{spaces-lemma-composition-representable-transformations} and
\ref{spaces-lemma-composition-representable-transformations-property}, and
Morphisms, Lemmas \ref{morphisms-lemma-composition-surjective} and
\ref{morphisms-lemma-composition-etale}.)
Note that the properties of being separated and locally quasi-finite
are preserved under base change, see
Morphisms of Spaces,
Lemmas \ref{spaces-morphisms-lemma-base-change-separated} and
\ref{spaces-morphisms-lemma-base-change-quasi-finite}.
Hence $V \times_Y X \to V$ is separated and locally quasi-finite as well,
and by
Morphisms of Spaces, Proposition
\ref{spaces-morphisms-proposition-locally-quasi-finite-separated-over-scheme}
we see that $V \times_Y X$ is a scheme as well.
Thus we may assume that $f : X \to Y$ is a separated and locally quasi-finite
morphism of schemes.

\medskip\noindent
Pick a point $y \in Y$. Pick $x_1, \ldots, x_n \in X$ points
lying over $y$. Pick an \'etale neighbourhood $a : (U, u) \to (Y, y)$ and a
decomposition
$$
U \times_S X =
W \amalg
\ \coprod\nolimits_{i = 1, \ldots, n}
\ \coprod\nolimits_{j = 1, \ldots, m_j}
V_{i, j}
$$
as in
More on Morphisms, Lemma
\ref{more-morphisms-lemma-etale-splits-off-quasi-finite-part-technical-variant}.
Pick any subset
$$
I \subset \{(i, j) \mid 1 \leq i \leq n, \ 1 \leq j \leq m_i\}.
$$
Given these choices we obtain a pair $(a, Z)$ with
$Z = \bigcup_{(i, j) \in I} V_{i, j}$
which satisfies conditions \ref{equation-finite-conditions}. In other words
we obtain a morphism $U \to (X/Y)_{fin}$. The construction of this morphism
depends on all the things we picked above, so we should really write
$$
U(y, n, x_1, \ldots, x_n, a, I) \longrightarrow (X/Y)_{fin}
$$
This morphism is \'etale by Lemma \ref{lemma-finite-criterion-etale}.

\medskip\noindent
Claim: The disjoint union of all of these is surjective onto $(X/Y)_{fin}$.
It is clear that if the claim holds, then the lemma is true.

\medskip\noindent
To show surjectivity we have to show the following (see
Spaces, Remark \ref{spaces-remark-warning}): Given a scheme $T$ over
$S$, a point $t \in T$, and a map $T \to (X/Y)_{fin}$ we can find a datum
$(y, n, x_1, \ldots, x_n, a, I)$ as above such that
$t$ is in the image of the projection map
$$
U(y, n, x_1, \ldots, x_n, a, I) \times_{(X/Y)_{fin}} T \longrightarrow T.
$$
To prove this we may clearly replace $T$ by
$\Spec(\overline{\kappa(t)})$ and
$T \to (X/Y)_{fin}$ by the composition
$\Spec(\overline{\kappa(t)}) \to T \to (X/Y)_{fin}$.
In other words, we may assume that $T$ is
the spectrum of an algebraically closed field.

\medskip\noindent
Let $T = \Spec(k)$ be the spectrum of an algebraically closed
field $k$. The morphism $T \to (X/Y)_{fin}$ is given by a pair
$(T \to Y, Z)$ satisfying conditions \ref{equation-finite-conditions}.
Here is a picture:
$$
\xymatrix{
& Z \ar[d] \ar[r] & X \ar[d] \\
\Spec(k) \ar@{=}[r] & T \ar[r] & Y
}
$$
Let $y \in Y$ be the image point of $T \to Y$.
Since $Z$ is finite over $k$ it has finitely many points.
Thus there exist finitely many points $x_1, \ldots, x_n \in X$
such that the image of $Z$ in $X$ is contained in $\{x_1, \ldots, x_n\}$.
Choose $a : (U, u) \to (Y, y)$ adapted to $y$ and $x_1, \ldots, x_n$ as
above, which gives the diagram
$$
\xymatrix{
W \amalg
\ \coprod\nolimits_{i = 1, \ldots, n}
\ \coprod\nolimits_{j = 1, \ldots, m_j}
V_{i, j} \ar[d] \ar[r] &
X \ar[d] \\
U \ar[r] & Y.
}
$$
Since $k$ is algebraically closed and
$\kappa(y) \subset \kappa(u)$ is finite separable
we may factor the morphism
$T = \Spec(k) \to Y$ through the morphism
$u = \Spec(\kappa(u)) \to \Spec(\kappa(y)) = y \subset Y$.
With this choice we obtain the commutative diagram:
$$
\xymatrix{
Z \ar[d] \ar[r] &
W \amalg
\ \coprod\nolimits_{i = 1, \ldots, n}
\ \coprod\nolimits_{j = 1, \ldots, m_j}
V_{i, j} \ar[d] \ar[r] &
X \ar[d] \\
\Spec(k) \ar[r] &
U \ar[r] & Y
}
$$
We know that the image of the left upper arrow ends up in
$\coprod V_{i, j}$. Recall also that $Z$ is an open subscheme
of $\Spec(k) \times_Y X$ by definition of $(X/Y)_{fin}$
and that the right hand square is a fibre product square.
Thus we see that
$$
Z \subset
\coprod\nolimits_{i = 1, \ldots, n}\ \coprod\nolimits_{j = 1, \ldots, m_j}
\Spec(k) \times_U V_{i, j}
$$
is an open subscheme. By construction (see
More on Morphisms, Lemma
\ref{more-morphisms-lemma-etale-splits-off-quasi-finite-part-technical-variant})
each $V_{i, j}$ has a unique point $v_{i, j}$ lying over $u$
with purely inseparable residue field extension
$\kappa(v_{i, j})/\kappa(u)$. Hence each
scheme $\Spec(k) \times_U V_{i, j}$ has exactly one
point. Thus we see that
$$
Z = \coprod\nolimits_{(i, j) \in I} \Spec(k) \times_U V_{i, j}
$$
for a unique subset
$I \subset \{(i, j) \mid 1 \leq i \leq n, \ 1 \leq j \leq m_i\}$.
Unwinding the definitions this shows that
$$
U(y, n, x_1, \ldots, x_n, a, I) \times_{(X/Y)_{fin}} T
$$
with $I$ as found above is nonempty as desired.
\end{proof}

\begin{proposition}
\label{proposition-finite-algebraic-space}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$ which
is separated and locally of finite type. Then $(X/Y)_{fin}$
is an algebraic space. Moreover, the morphism
$(X/Y)_{fin} \to Y$ is \'etale.
\end{proposition}

\begin{proof}
By
Lemma \ref{lemma-finite-lives-on-locally-quasi-finite-part}
we may replace $X$ by the open subscheme which is locally quasi-finite
over $Y$. Hence we may assume that $f$ is separated and locally quasi-finite.
We will check the three conditions of
Spaces, Definition \ref{spaces-definition-algebraic-space}.
Condition (1) follows from
Lemma \ref{lemma-finite-sheaf}.
Condition (2) follows from
Lemma \ref{lemma-finite-diagonal}.
Finally, condition (3) follows from
Lemma \ref{lemma-finite-surjective-etale-cover}.
Thus $(X/Y)_{fin}$ is an algebraic space.
Moreover, that lemma shows that there exists a commutative
diagram
$$
\xymatrix{
U \ar[rr] \ar[rd] & & (X/Y)_{fin} \ar[ld] \\
& Y
}
$$
with horizontal arrow surjective and \'etale and south-east arrow
\'etale. By
Properties of Spaces, Lemma \ref{spaces-properties-lemma-etale-local}
this implies that the south-west arrow is \'etale as well.
\end{proof}

\begin{remark}
\label{remark-warning}
The condition that $f$ be separated cannot be dropped from
Proposition \ref{proposition-finite-algebraic-space}.
An example is to take $X$ the affine line with zero doubled, see
Schemes, Example \ref{schemes-example-affine-space-zero-doubled},
$Y = \mathbf{A}^1_k$ the affine line, and $X \to Y$ the obvious map.
Recall that over $0 \in Y$ there are two points $0_1$ and $0_2$
in $X$. Thus $(X/Y)_{fin}$ has four points over $0$, namely
$\emptyset, \{0_1\}, \{0_2\}, \{0_1, 0_2\}$.
Of these four points only three can be lifted to an open
subscheme of $U \times_Y X$ finite over $U$ for $U \to Y$ \'etale,
namely $\emptyset, \{0_1\}, \{0_2\}$. This shows that $(X/Y)_{fin}$
if representable by an algebraic space is not \'etale over $Y$.
Similar arguments show that $(X/Y)_{fin}$ is really not an algebraic
space. Details omitted.
\end{remark}

\begin{remark}
\label{remark-not-scheme}
Let $Y = \mathbf{A}^1_{\mathbf{R}}$ be the affine line over the real
numbers, and let $X = \Spec(\mathbf{C})$ mapping to the
$\mathbf{R}$-rational point $0$ in $Y$. In this case the morphism
$f : X \to Y$ is finite, but it is not the case that $(X/Y)_{fin}$
is a scheme. Namely, one can show that in this case the algebraic
space $(X/Y)_{fin}$ is isomorphic to the algebraic space of
Spaces, Example \ref{spaces-example-non-representable-descent}
associated to the extension $\mathbf{R} \subset \mathbf{C}$.
Thus it is really necessary to leave the category of schemes
in order to represent the sheaf $(X/Y)_{fin}$, even when $f$
is a finite morphism.
\end{remark}

\begin{lemma}
\label{lemma-finite-separated-flat-locally-finite-presentation}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$ which
is separated, flat, and locally of finite presentation.
In this case
\begin{enumerate}
\item $(X/Y)_{fin} \to Y$ is separated, representable, and \'etale, and
\item if $Y$ is a scheme, then $(X/Y)_{fin}$ is (representable by) a scheme.
\end{enumerate}
\end{lemma}

\begin{proof}
Since $f$ is in particular separated and locally of finite type (see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-finite-presentation-finite-type})
we see that $(X/Y)_{fin}$ is an algebraic space by
Proposition \ref{proposition-finite-algebraic-space}.
To prove that $(X/Y)_{fin} \to Y$ is separated we have to show
the following: Given a scheme $T$ and two pairs $(a, Z_1)$ and $(a, Z_2)$
over $T$
with identical first component satisfying \ref{equation-finite-conditions}
there is a closed subscheme $V \subset T$ with the following
property: For any morphism of schemes $h : T' \to T$ we have
$$
h \text{ factors through } V \Leftrightarrow
\Big(T' \times_T Z_1 = T' \times_T Z_2
\text{ as subspaces of }T' \times_Y X\Big)
$$
In the proof of
Lemma \ref{lemma-finite-diagonal}
we have seen that $V = T' \setminus E$ is an open subscheme of $T'$
with closed complement
$$
E =
\text{pr}_0|_{Z_1}\left(Z_1 \setminus Z_1 \cap Z_2)\right)
\cup
\text{pr}_0|_{Z_2}\left(Z_2 \setminus Z_1 \cap Z_2)\right).
$$
Thus everything comes down to showing that $E$ is also open. By
Lemma \ref{lemma-finite-separated}
we see that $Z_1$ and $Z_2$ are closed in $T' \times_Y X$. Hence
$Z_1 \setminus Z_1 \cap Z_2$ is open in $Z_1$. As $f$ is flat and
locally of finite presentation, so is $\text{pr}_0|_{Z_1}$.
This is true as $Z_1$ is an open subspace of the base change
$T' \times_Y X$, and
Morphisms of Spaces,
Lemmas \ref{spaces-morphisms-lemma-base-change-finite-presentation} and
Lemmas \ref{spaces-morphisms-lemma-base-change-flat}.
Hence $\text{pr}_0|_{Z_1}$ is open, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-fppf-open}.
Thus $\text{pr}_0|_{Z_1}\left(Z_1 \setminus Z_1 \cap Z_2)\right)$ is
open and it follows that $E$ is open as desired.

\medskip\noindent
We have already seen that $(X/Y)_{fin} \to Y$ is \'etale, see
Proposition \ref{proposition-finite-algebraic-space}.
Hence now we know it is locally quasi-finite (see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-etale-locally-quasi-finite})
and separated, hence representable by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-quasi-finite-separated-representable}.
The final assertion is clear (if you like you can use
Morphisms of Spaces, Proposition
\ref{spaces-morphisms-proposition-locally-quasi-finite-separated-over-scheme}).
\end{proof}

\noindent
Variant: Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Let $\sigma : Y \to X$ be a section of $f$.
For an algebraic space or a scheme $T$ over $S$ consider pairs
$(a, Z)$ where
\begin{equation}
\label{equation-finite-conditions-variant}
\begin{matrix}
a : T \to Y\text{ is a morphism over }S, \\
Z \subset T \times_Y X\text{ is an open subspace} \\
\text{such that }\text{pr}_0|_Z : Z \to T\text{ is finite and} \\
(1_T, \sigma \circ a) : T \to T \times_Y X\text{ factors through }Z.
\end{matrix}
\end{equation}
We will denote $(X/Y, \sigma)_{fin}$ the subfunctor of $(X/Y)_{fin}$
parametrizing these pairs.

\begin{lemma}
\label{lemma-finite-plus-section}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Let $\sigma : Y \to X$ be a section of $f$. Consider the
transformation of functors
$$
t : (X/Y, \sigma)_{fin} \longrightarrow (X/Y)_{fin}.
$$
defined above. Then
\begin{enumerate}
\item $t$ is representable by open immersions,
\item if $f$ is separated, then $t$ is representable by open
and closed immersions,
\item if $(X/Y)_{fin}$ is an algebraic space, then
$(X/Y, \sigma)_{fin}$ is an algebraic space and
an open subspace of $(X/Y)_{fin}$, and
\item if $(X/Y)_{fin}$ is a scheme, then $(X/Y, \sigma)_{fin}$ is an
open subscheme of it.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted. Hint: Given a pair $(a, Z)$ over $T$ as in
(\ref{equation-finite-conditions}) the inverse image of
$Z$ by $(1_T, \sigma \circ a) : T \to T \times_Y X$ is the open
subscheme of $T$ we are looking for.
\end{proof}





\section{Finite collections of arrows}
\label{section-finite-set-arrows}

\noindent
Let $\mathcal{C}$ be a groupoid, see
Categories, Definition \ref{categories-definition-groupoid}.
As discussed in
Groupoids, Section \ref{groupoids-section-groupoids}
this corresponds to a septuple $(\text{Ob}, \text{Arrows}, s, t, c, e, i)$.

\medskip\noindent
Using this data we can make another groupoid $\mathcal{C}_{fin}$
as follows:
\begin{enumerate}
\item An object of $\mathcal{C}_{fin}$ consists of a finite subset
$Z \subset \text{Arrows}$ with the following properties:
\begin{enumerate}
\item $s(Z) = \{u\}$ is a singleton, and
\item $e(u) \in Z$.
\end{enumerate}
\item A morphism of $\mathcal{C}_{fin}$ consists of a pair
$(Z, z)$, where $Z$ is an object of $\mathcal{C}_{fin}$ and
$z \in Z$.
\item The source of $(Z, z)$ is $Z$.
\item The target of $(Z, z)$ is $t(Z, z) = \{z' \circ z^{-1}; z' \in Z\}$.
\item Given $(Z_1, z_1)$, $(Z_2, z_2)$ such that $s(Z_1, z_1) = t(Z_2, z_2)$
the composition $(Z_1, z_1) \circ (Z_2, z_2)$ is $(Z_2, z_1 \circ z_2)$.
\end{enumerate}
We omit the verification that this defines a groupoid.
Pictorially an object of $\mathcal{C}_{fin}$ can be viewed
as a diagram
$$
\xymatrix{
& \bullet \\
\bullet \ar@(ul, dl)[]_e \ar[ru] \ar[r] \ar[rd] & \bullet \\
& \bullet
}
$$
To make a morphism of $\mathcal{C}_{fin}$ you pick one of the arrows
and you precompose the other arrows by its inverse. For example if we pick
the middle horizontal arrow then the target is the picture
$$
\xymatrix{
& \bullet \\
\bullet & \bullet \ar[l] \ar[u] \ar@(dr, ur)[]_e \ar[d] \\
& \bullet
}
$$
Note that the cardinalities of $s(Z, z)$ and $t(Z, z)$ are equal.
So $\mathcal{C}_{fin}$ is really a countable disjoint union of
groupoids.




\section{The finite part of a groupoid}
\label{section-finite-part-groupoid}

\noindent
In this section we are going to use the idea explained in
Section \ref{section-finite-set-arrows}
to take the finite part of a groupoid in algebraic spaces.

\medskip\noindent
Let $S$ be a scheme.
Let $B$ be an algebraic space over $S$.
Let $(U, R, s, t, c, e, i)$ be a groupoid in algebraic spaces over $B$.
Assumption: The morphisms $s, t$ are separated and locally of finite type.
This notation and assumption will we be fixed throughout this section.

\medskip\noindent
Denote $R_s$ the algebraic space $R$ seen as an
algebraic space over $U$ via $s$. Let
$U' = (R_s/U, e)_{fin}$. Since $s$ is separated and locally of
finite type, by
Proposition \ref{proposition-finite-algebraic-space} and
Lemma \ref{lemma-finite-plus-section},
we see that $U'$ is an algebraic space endowed with an \'etale morphism
$g : U' \to U$. Moreover, by
Lemma \ref{lemma-finite-sheaf}
there exists a universal open subspace
$Z_{univ} \subset R \times_{s, U, g} U'$ which is finite over $U'$
and such that $(1_{U'}, e \circ g) : U' \to R \times_{s, U, g} U'$
factors through $Z_{univ}$. Moreover, by
Lemma \ref{lemma-finite-separated}
the open subspace $Z_{univ}$ is also closed in $R \times_{s, U', g} U$.
Picture so far:
$$
\xymatrix{
Z_{univ} \ar[d] \ar[rd] & \\
R \times_{s, U, g} U' \ar[d] \ar[r] & U' \ar[d]^g \\
R \ar[r]^s & U
}
$$
Let $T$ be a scheme over $B$. We see that a $T$-valued point of
$Z_{univ}$ may be viewed as a triple $(u, Z, z)$ where
\begin{enumerate}
\item $u : T \to U$ is a $T$-valued point of $U$,
\item $Z \subset R \times_{s, U, u} T$ is an open and closed subspace
finite over $T$ such that $(e \circ u, 1_T)$ factors through it, and
\item $z : T \to R$ is a $T$-valued point of $R$ with $s \circ z = u$
and such that $(z, 1_T)$ factors through $Z$.
\end{enumerate}
Having said this, it is morally clear from the discussion in
Section \ref{section-finite-set-arrows}
that we can turn $(Z_{univ}, U')$ into a groupoid in algebraic spaces
over $B$. To make sure will define the morphisms $s', t', c', e', i'$
one by one using the functorial point of view. (Please don't read this
before reading and understanding the simple construction in
Section \ref{section-finite-set-arrows}.)

\medskip\noindent
The morphism $s' : Z_{univ} \to U'$ corresponds to the rule
$$
s' : (u, Z, z) \mapsto (u, Z).
$$
The morphism $t' : Z_{univ} \to U'$ is given by the rule
$$
t' : (u, Z, z) \mapsto (t \circ z, c(Z, i \circ z)).
$$
The entry $c(Z, i \circ z)$
makes sense as the map
$c(-, i \circ z) : R \times_{s, U, u} T \to R \times_{s, U, t \circ z} T$
is an isomorphism with inverse $c(-, z)$.
The morphism $e' : U' \to Z_{univ}$ is given by the rule
$$
e' : (u, Z) \mapsto (u, Z, (e \circ u, 1_T)).
$$
Note that this makes sense by the requirement that $(e \circ u, 1_T)$
factors through $Z$.
The morphism $i' : Z_{univ} \to Z_{univ}$ is given by the rule
$$
i' : (u, Z, z) \mapsto (t \circ z, c(Z, i \circ z), i \circ z).
$$
Finally, composition is defined by the rule
$$
c' : ((u_1, Z_1, z_1), (u_2, Z_2, z_2)) \mapsto (u_2, Z_2, z_1 \circ z_2).
$$
We omit the verification that the axioms of a groupoid in algebraic
spaces hold for $(U', Z_{univ}, s', t', c', e', i')$.

\medskip\noindent
A final piece of information is that there is a canonical morphism
of groupoids
$$
(U', Z_{univ}, s', t', c', e', i')
\longrightarrow
(U, R, s, t, c, e, i)
$$
Namely, the morphism $U' \to U$ is the morphism $g : U' \to U$
which is defined by the rule $(u, Z) \mapsto u$. The morphism
$Z_{univ} \to R$ is defined by the rule $(u, Z, z) \mapsto z$.
This finishes the construction. Let us summarize our findings as
follows.

\begin{lemma}
\label{lemma-finite-part-groupoid}
Let $S$ be a scheme.
Let $B$ be an algebraic space over $S$.
Let $(U, R, s, t, c, e, i)$ be a groupoid in algebraic spaces over $B$.
Assume the morphisms $s, t$ are separated and locally of finite type.
There exists a canonical morphism
$$
(U', Z_{univ}, s', t', c', e', i')
\longrightarrow
(U, R, s, t, c, e, i)
$$
of groupoids in algebraic spaces over $B$ where
\begin{enumerate}
\item $g : U' \to U$ is identified with $(R_s/U, e)_{fin} \to U$, and
\item $Z_{univ} \subset R \times_{s, U, g} U'$ is the universal
open (and closed) subspace finite over $U'$ which contains the base
change of the unit $e$.
\end{enumerate}
\end{lemma}

\begin{proof}
See discussion above.
\end{proof}









\section{\'Etale localization of groupoid schemes}
\label{section-etale-localize}

\noindent
In this section we prove results similar to \cite[Proposition 4.2]{K-M}.
We try to be a bit more general, and we try to avoid using Hilbert schemes
by using the finite part of a morphism instead.
The goal is to "split" a groupoid in algebraic spaces over a point
after \'etale localization. Here is the definition (very similar to
\cite[Definition 4.1]{K-M}).

\begin{definition}
\label{definition-split-at-point}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$
Let $(U, R, s, t, c)$ be a groupoid in algebraic spaces over $B$.
Let $u \in |U|$ be a point.
\begin{enumerate}
\item We say $R$ is {\it strongly split over $u$} if there exists an open
subspace $P \subset R$ such that
\begin{enumerate}
\item $(U, P, s|_P, t|_P, c|_{P \times_{s, U, t} P})$ is a
groupoid in algebraic spaces over $B$,
\item $s|_P$, $t|_P$ are finite, and
\item $\{r \in |R| : s(r) = u, t(r) = u\} \subset |P|$.
\end{enumerate}
The choice of such a $P$ will be called a
{\it strong splitting of $R$ over $u$}.
\item We say $R$ is {\it split over $u$} if there exists an open
subspace $P \subset R$ such that
\begin{enumerate}
\item $(U, P, s|_P, t|_P, c|_{P \times_{s, U, t} P})$ is a
groupoid in algebraic spaces over $B$,
\item $s|_P$, $t|_P$ are finite, and
\item $\{g \in |G| : g\text{ maps to }u\} \subset |P|$ where
$G \to U$ is the stabilizer.
\end{enumerate}
The choice of such a $P$ will be called a
{\it splitting of $R$ over $u$}.
\item We say $R$ is {\it quasi-split over $u$} if there exists an open
subspace $P \subset R$ such that
\begin{enumerate}
\item $(U, P, s|_P, t|_P, c|_{P \times_{s, U, t} P})$ is a
groupoid in algebraic spaces over $B$,
\item $s|_P$, $t|_P$ are finite, and
\item $e(u) \in |P|$\footnote{This condition is implied by (a).}.
\end{enumerate}
The choice of such a $P$ will be called a {\it quasi-splitting of $R$ over $u$}.
\end{enumerate}
\end{definition}

\noindent
Note the similarity of the conditions on $P$ to the conditions on
pairs in (\ref{equation-finite-conditions}). In particular, if
$s, t$ are separated, then $P$ is also closed in $R$ (see
Lemma \ref{lemma-finite-separated}).

\medskip\noindent
Suppose we start with a groupoid in algebraic spaces
$(U, R, s, t, c)$ over $B$ and a point $u \in |U|$.
Since the goal is to split the groupoid after \'etale localization
we may as well replace $U$ by an affine scheme (what we mean
is that this is harmless for any possible application).
Moreover, the additional hypotheses we are going to have
to impose will force $R$ to be a scheme at least in a neighbourhood
of $\{r \in |R| : s(r) = u, t(r) = u\}$ or $e(u)$. This is why
we start with a groupoid scheme as described below.
However, our technique of proof leads us outside of the category of schemes,
which is why we have formulated a splitting for the case of groupoids
in algebraic spaces above.
On the other hand, we know of no applications but
the case where the morphisms $s$, $t$
are also flat and of finite presentation, in which case
we end up back in the category of schemes.

\begin{situation}[Strong splitting]
\label{situation-strong-splitting}
Let $S$ be a scheme.
Let $(U, R, s, t, c)$ be a groupoid scheme over $S$.
Let $u \in U$ be a point. Assume that
\begin{enumerate}
\item $s, t : R \to U$ are separated,
\item $s$, $t$ are locally of finite type,
\item the set $\{r \in R : s(r) = u, t(r) = u\}$ is finite, and
\item $s$ is quasi-finite at each point of the set in (3).
\end{enumerate}
Note that assumptions (3) and (4) are implied by the assumption
that the fibre $s^{-1}(\{u\})$ is finite, see
Morphisms, Lemma \ref{morphisms-lemma-finite-fibre}.
\end{situation}

\begin{situation}[Splitting]
\label{situation-splitting}
Let $S$ be a scheme.
Let $(U, R, s, t, c)$ be a groupoid scheme over $S$.
Let $u \in U$ be a point. Assume that
\begin{enumerate}
\item $s, t : R \to U$ are separated,
\item $s$, $t$ are locally of finite type,
\item the set $\{g \in G : g\text{ maps to }u\}$ is finite where $G \to U$
is the stabilizer, and
\item $s$ is quasi-finite at each point of the set in (3).
\end{enumerate}
\end{situation}

\begin{situation}[Quasi-splitting]
\label{situation-quasi-splitting}
Let $S$ be a scheme.
Let $(U, R, s, t, c)$ be a groupoid scheme over $S$.
Let $u \in U$ be a point. Assume that
\begin{enumerate}
\item $s, t : R \to U$ are separated,
\item $s$, $t$ are locally of finite type, and
\item $s$ is quasi-finite at $e(u)$.
\end{enumerate}
\end{situation}

\noindent
For our application to the existence theorems for algebraic spaces
the case of quasi-splittings is sufficient. Moreover, the quasi-splitting
case will allow us to prove an \'etale local structure theorem for
quasi-DM stacks. The splitting case will be used to prove a version
of the Keel-Mori theorem. The strong splitting case applies to give
an \'etale local structure theorem for quasi-DM algebraic stacks
with quasi-compact diagonal.

\begin{lemma}[Existence of strong splitting]
\label{lemma-strong-splitting}
In Situation \ref{situation-strong-splitting}
there exists an algebraic space $U'$, an \'etale morphism
$U' \to U$, and a point $u' : \Spec(\kappa(u)) \to U'$
lying over $u : \Spec(\kappa(u)) \to U$
such that the restriction $R' = R|_{U'}$ of $R$ to $U'$
is strongly split over $u'$.
\end{lemma}

\begin{proof}
Let $f : (U', Z_{univ}, s', t', c') \to (U, R, s, t, c)$ be as constructed in
Lemma \ref{lemma-finite-part-groupoid}.
Recall that $R' = R \times_{(U \times_S U)} (U' \times_S U')$.
Thus we get a morphism $(f, t', s') : Z_{univ} \to R'$ of groupoids
in algebraic spaces
$$
(U', Z_{univ}, s', t', c') \to (U', R', s', t', c')
$$
(by abuse of notation we indicate the morphisms in the two groupoids
by the same symbols). Now, as $Z_{univ} \subset R \times_{s, U, g} U'$ is open
and $R' \to R \times_{s, U, g} U'$ is \'etale (as a base change
of $U' \to U$) we see that $Z_{univ} \to R'$ is an open immersion.
By construction the morphisms $s', t' : Z_{univ} \to U'$ are finite.
It remains to find the point $u'$ of $U'$.

\medskip\noindent
We think of $u$ as a morphism $\Spec(\kappa(u)) \to U$ as in
the statement of the lemma. Set $F_u = R \times_{s, U} \Spec(\kappa(u))$.
The set $\{r \in R : s(r) = u, t(r) = u\}$ is finite by assumption
and $F_u \to \Spec(\kappa(u))$ is quasi-finite at each
of its elements by assumption. Hence we can find a decomposition into
open and closed subschemes
$$
F_u = Z_u \amalg Rest
$$
for some scheme $Z_u$ finite over $\kappa(u)$ whose support is
$\{r \in R : s(r) = u, t(r) = u\}$. Note that $e(u) \in Z_u$.
Hence by the construction of $U'$ in
Section \ref{section-finite-part-groupoid}
$(u, Z_u)$ defines a $\Spec(\kappa(u))$-valued
point $u'$ of $U'$.

\medskip\noindent
We still have to show that the set
$\{r' \in |R'| : s'(r') = u', t'(r') = u'\}$
is contained in $|Z_{univ}|$.
Pick any point $r'$ in this set and represent it by a morphism
$z' : \Spec(k) \to R'$. Denote $z : \Spec(k) \to R$
the composition of $z'$ with the map $R' \to R$.
Clearly, $z$ defines an element of the set
$\{r \in R : s(r) = u, t(r) = u\}$.
Also, the compositions $s \circ z, t \circ z : \Spec(k) \to U$
factor through $u$, so we may think of $s \circ z, t \circ z$
as a morphism $\Spec(k) \to \Spec(\kappa(u))$. Then
$z' = (z, u' \circ t \circ z, u'\circ s \circ u)$ as morphisms into
$R' = R \times_{(U \times_S U)} (U' \times_S U')$.
Consider the triple
$$
(s \circ z, Z_u \times_{\Spec(\kappa(u)), s \circ z} \Spec(k), z)
$$
where $Z_u$ is as above. This defines a $\Spec(k)$-valued point
of $Z_{univ}$ whose image via $s', t'$ in $U'$ is $u'$ and
whose image via
$Z_{univ} \to R'$ is the point $r'$ by the relationship between
$z$ and $z'$ mentioned above.
This finishes the proof.
\end{proof}

\begin{lemma}[Existence of splitting]
\label{lemma-splitting}
In Situation \ref{situation-splitting}
there exists an algebraic space $U'$, an \'etale morphism
$U' \to U$, and a point $u' : \Spec(\kappa(u)) \to U'$
lying over $u : \Spec(\kappa(u)) \to U$
such that the restriction $R' = R|_{U'}$ of $R$ to $U'$
is split over $u'$.
\end{lemma}

\begin{proof}
Let $f : (U', Z_{univ}, s', t', c') \to (U, R, s, t, c)$ be as constructed in
Lemma \ref{lemma-finite-part-groupoid}.
Recall that $R' = R \times_{(U \times_S U)} (U' \times_S U')$.
Thus we get a morphism $(f, t', s') : Z_{univ} \to R'$ of groupoids
in algebraic spaces
$$
(U', Z_{univ}, s', t', c') \to (U', R', s', t', c')
$$
(by abuse of notation we indicate the morphisms in the two groupoids
by the same symbols). Now, as $Z_{univ} \subset R \times_{s, U, g} U'$ is open
and $R' \to R \times_{s, U, g} U'$ is \'etale (as a base change
of $U' \to U$) we see that $Z_{univ} \to R'$ is an open immersion.
By construction the morphisms $s', t' : Z_{univ} \to U'$ are finite.
It remains to find the point $u'$ of $U'$.

\medskip\noindent
We think of $u$ as a morphism $\Spec(\kappa(u)) \to U$ as in
the statement of the lemma. Set $F_u = R \times_{s, U} \Spec(\kappa(u))$.
Let $G_u \subset F_u$ be the scheme theoretic fibre of $G \to U$ over $u$.
By assumption $G_u$ is finite and $F_u \to \Spec(\kappa(u))$
is quasi-finite at each point of $G_u$ by assumption.
Hence we can find a decomposition into open and closed subschemes
$$
F_u = Z_u \amalg Rest
$$
for some scheme $Z_u$ finite over $\kappa(u)$ whose support is $G_u$.
Note that $e(u) \in Z_u$. Hence by the construction of $U'$ in
Section \ref{section-finite-part-groupoid}
$(u, Z_u)$ defines a $\Spec(\kappa(u))$-valued
point $u'$ of $U'$.

\medskip\noindent
We still have to show that the set $\{g' \in |G'| : g'\text{ maps to }u'\}$
is contained in $|Z_{univ}|$. Pick any point $g'$ in this set and
represent it by a morphism $z' : \Spec(k) \to G'$. Denote
$z : \Spec(k) \to G$ the composition of $z'$ with the map $G' \to G$.
Clearly, $z$ defines a point of $G_u$. In fact, let us write
$\tilde u : \Spec(k) \to u \to U$ for the corresponding map to $u$ or $U$.
Consider the triple
$$
(\tilde u, Z_u \times_{u, \tilde u} \Spec(k), z)
$$
where $Z_u$ is as above. This defines a $\Spec(k)$-valued point
of $Z_{univ}$ whose image via $s', t'$ in $U'$ is $u'$ and
whose image via $Z_{univ} \to R'$ is the point $z'$
(because the image in $R$ is $z$).
This finishes the proof.
\end{proof}

\begin{lemma}[Existence of quasi-splitting]
\label{lemma-quasi-splitting}
In Situation \ref{situation-quasi-splitting}
there exists an algebraic space $U'$, an \'etale morphism
$U' \to U$, and a point $u' : \Spec(\kappa(u)) \to U'$
lying over $u : \Spec(\kappa(u)) \to U$
such that the restriction $R' = R|_{U'}$ of $R$ to $U'$
is quasi-split over $u'$.
\end{lemma}

\begin{proof}
Let $f : (U', Z_{univ}, s', t', c') \to (U, R, s, t, c)$ be as constructed in
Lemma \ref{lemma-finite-part-groupoid}.
Recall that $R' = R \times_{(U \times_S U)} (U' \times_S U')$.
Thus we get a morphism $(f, t', s') : Z_{univ} \to R'$ of groupoids
in algebraic spaces
$$
(U', Z_{univ}, s', t', c') \to (U', R', s', t', c')
$$
(by abuse of notation we indicate the morphisms in the two groupoids
by the same symbols). Now, as $Z_{univ} \subset R \times_{s, U, g} U'$ is open
and $R' \to R \times_{s, U, g} U'$ is \'etale (as a base change
of $U' \to U$) we see that $Z_{univ} \to R'$ is an open immersion.
By construction the morphisms $s', t' : Z_{univ} \to U'$ are finite.
It remains to find the point $u'$ of $U'$.

\medskip\noindent
We think of $u$ as a morphism $\Spec(\kappa(u)) \to U$ as in
the statement of the lemma. Set $F_u = R \times_{s, U} \Spec(\kappa(u))$.
The morphism $F_u \to \Spec(\kappa(u))$ is quasi-finite at $e(u)$
by assumption. Hence we can find a decomposition into open and closed
subschemes
$$
F_u = Z_u \amalg Rest
$$
for some scheme $Z_u$ finite over $\kappa(u)$ whose support is $e(u)$.
Hence by the construction of $U'$ in
Section \ref{section-finite-part-groupoid}
$(u, Z_u)$ defines a $\Spec(\kappa(u))$-valued
point $u'$ of $U'$. To finish the proof we have to show that
$e'(u') \in Z_{univ}$ which is clear.
\end{proof}

\noindent
Finally, when we add additional assumptions we obtain schemes.

\begin{lemma}
\label{lemma-strong-splitting-scheme}
In Situation \ref{situation-strong-splitting} assume in addition that
$s, t$ are flat and locally of finite presentation.
Then there exists a scheme $U'$, a separated \'etale morphism
$U' \to U$, and a point $u' \in U'$
lying over $u$ with $\kappa(u) = \kappa(u')$
such that the restriction $R' = R|_{U'}$ of $R$ to $U'$
is strongly split over $u'$.
\end{lemma}

\begin{proof}
This follows from the construction of $U'$ in the proof of
Lemma \ref{lemma-strong-splitting}
because in this case $U' = (R_s/U, e)_{fin}$ is a scheme separated over
$U$ by
Lemmas \ref{lemma-finite-separated-flat-locally-finite-presentation} and
\ref{lemma-finite-plus-section}.
\end{proof}

\begin{lemma}
\label{lemma-splitting-scheme}
In Situation \ref{situation-splitting} assume in addition that
$s, t$ are flat and locally of finite presentation.
Then there exists a scheme $U'$, a separated \'etale morphism
$U' \to U$, and a point $u' \in U'$
lying over $u$ with $\kappa(u) = \kappa(u')$
such that the restriction $R' = R|_{U'}$ of $R$ to $U'$
is split over $u'$.
\end{lemma}

\begin{proof}
This follows from the construction of $U'$ in the proof of
Lemma \ref{lemma-splitting}
because in this case $U' = (R_s/U, e)_{fin}$ is a scheme separated over
$U$ by
Lemmas \ref{lemma-finite-separated-flat-locally-finite-presentation} and
\ref{lemma-finite-plus-section}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-splitting-scheme}
In Situation \ref{situation-quasi-splitting} assume in addition that
$s, t$ are flat and locally of finite presentation.
Then there exists a scheme $U'$, a separated \'etale morphism
$U' \to U$, and a point $u' \in U'$ lying over $u$ with
$\kappa(u) = \kappa(u')$ such that the restriction $R' = R|_{U'}$ of
$R$ to $U'$ is quasi-split over $u'$.
\end{lemma}

\begin{proof}
This follows from the construction of $U'$ in the proof of
Lemma \ref{lemma-quasi-splitting}
because in this case $U' = (R_s/U, e)_{fin}$ is a scheme separated
over $U$ by
Lemmas \ref{lemma-finite-separated-flat-locally-finite-presentation} and
\ref{lemma-finite-plus-section}.
\end{proof}

\noindent
In fact we can obtain affine schemes by applying an earlier result
on finite locally free groupoids.

\begin{lemma}
\label{lemma-strong-splitting-affine-scheme}
In Situation \ref{situation-strong-splitting} assume in addition that
$s, t$ are flat and locally of finite presentation and that $U$ is affine.
Then there exists an affine scheme $U'$, an \'etale morphism
$U' \to U$, and a point $u' \in U'$ lying over $u$ with
$\kappa(u) = \kappa(u')$ such that the restriction $R' = R|_{U'}$ of
$R$ to $U'$ is strongly split over $u'$.
\end{lemma}

\begin{proof}
Let $U' \to U$ and $u' \in U'$ be the separated \'etale morphism of schemes
we found in Lemma \ref{lemma-strong-splitting-scheme}.
Let $P \subset R'$ be the strong splitting of $R'$ over $u'$. By
More on Groupoids, Lemma \ref{more-groupoids-lemma-restrict-preserves-type}
the morphisms $s', t' : R' \to U'$ are flat and locally of finite presentation.
They are finite by assumption. Hence $s', t'$ are finite locally
free, see
Morphisms, Lemma \ref{morphisms-lemma-finite-flat}.
In particular $t(s^{-1}(u'))$ is a finite set of points
$\{u'_1, u'_2, \ldots, u'_n\}$ of $U'$. Choose a quasi-compact open
$W \subset U'$ containing each $u'_i$. As $U$ is affine the morphism
$W \to U$ is quasi-compact (see
Schemes, Lemma \ref{schemes-lemma-quasi-compact-affine}).
The morphism $W \to U$ is also locally quasi-finite (see
Morphisms, Lemma \ref{morphisms-lemma-etale-locally-quasi-finite})
and separated. Hence by
More on Morphisms,
Lemma \ref{more-morphisms-lemma-quasi-finite-separated-quasi-affine}
(a version of Zariski's Main Theorem)
we conclude that $W$ is quasi-affine. By
Properties, Lemma \ref{properties-lemma-ample-finite-set-in-affine}
we see that $\{u'_1, \ldots, u'_n\}$ are contained in an affine
open of $U'$. Thus we may apply
Groupoids, Lemma \ref{groupoids-lemma-find-invariant-affine}
to conclude that there exists an affine $P$-invariant open
$U'' \subset U'$ which contains $u'$.

\medskip\noindent
To finish the proof denote $R'' = R|_{U''}$ the restriction of $R$
to $U''$. This is the same as the restriction of $R'$ to $U''$.
As $P \subset R'$ is an open and closed subscheme, so is
$P|_{U''} \subset R''$. By construction the open subscheme $U'' \subset U'$
is $P$-invariant which means that
$P|_{U''} = (s'|_P)^{-1}(U'') = (t'|_P)^{-1}(U'')$
(see discussion in
Groupoids, Section \ref{groupoids-section-invariant})
so the restrictions of $s''$ and $t''$ to $P|_{U''}$ are still finite.
The sub groupoid scheme $P|_{U''}$ is still a strong splitting of
$R''$ over $u''$; above we verified (a), (b) and (c) holds as
$\{r' \in R': t'(r') = u', s'(r') = u'\} =
\{r'' \in R'': t''(r'') = u', s''(r'') = u'\}$ trivially.
The lemma is proved.
\end{proof}

\begin{lemma}
\label{lemma-splitting-affine-scheme}
In Situation \ref{situation-splitting} assume in addition that
$s, t$ are flat and locally of finite presentation and that $U$ is affine.
Then there exists an affine scheme $U'$, an \'etale morphism
$U' \to U$, and a point $u' \in U'$ lying over $u$ with
$\kappa(u) = \kappa(u')$ such that the restriction $R' = R|_{U'}$ of
$R$ to $U'$ is split over $u'$.
\end{lemma}

\begin{proof}
The proof of this lemma is literally the same as the proof of
Lemma \ref{lemma-strong-splitting-affine-scheme}
except that ``strong splitting'' needs to be replaced by ``splitting''
(2 times) and that the reference to
Lemma \ref{lemma-strong-splitting-scheme}
needs to be replaced by a reference to
Lemma \ref{lemma-splitting-scheme}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-splitting-affine-scheme}
In Situation \ref{situation-quasi-splitting} assume in addition that
$s, t$ are flat and locally of finite presentation and that $U$ is affine.
Then there exists an affine scheme $U'$, an \'etale morphism
$U' \to U$, and a point $u' \in U'$ lying over $u$ with
$\kappa(u) = \kappa(u')$ such that the restriction $R' = R|_{U'}$ of
$R$ to $U'$ is quasi-split over $u'$.
\end{lemma}

\begin{proof}
The proof of this lemma is literally the same as the proof of
Lemma \ref{lemma-strong-splitting-affine-scheme}
except that ``strong splitting'' needs to be replaced by ``quasi-splitting''
(2 times) and that the reference to
Lemma \ref{lemma-strong-splitting-scheme}
needs to be replaced by a reference to
Lemma \ref{lemma-quasi-splitting-scheme}.
\end{proof}


\input{chapters}

\bibliography{my}
\bibliographystyle{amsalpha}

\end{document}
